Multi-threading questions

View: New views
6 Messages — Rating Filter:   Alert me  

Multi-threading questions

by Bernd Schoeller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

a couple for questions concerning the libraries delivered with ES and  
multi-threading:

1) Is there a list which libraries and classes are 'thread-safe'?

2) Are there thread-safe data-structures? Is there an implementation of a  
non-blocking queue?

3) Is there a facility similar to the (Unix) select system call that can  
be used to avoid multi-threading in many cases? I have seen it available  
in ePosix, but not (yet) found it in EiffelBase.

Thanks for any answers,
   Bernd

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


RE: Multi-threading questions

by Emmanuel Stapf [ES] :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 1) Is there a list which libraries and classes are 'thread-safe'?

All Eiffel libraries apart from the Eiffel Thread library are not thread-safe and will require some synchronization objects to be used safely from different threads. Eiffel libraries are re-entrant though.
 
> 2) Are there thread-safe data-structures? Is there an
> implementation of a non-blocking queue?

Not that I know.

> 3) Is there a facility similar to the (Unix) select system
> call that can be used to avoid multi-threading in many cases?
> I have seen it available in ePosix, but not (yet) found it in
> EiffelBase.

`select' is very limited on Windows, it can only work with socket by default (EiffelNet uses it internally). I'm not sure how it is implemented in ePosix for Windows in a general manner. And if you have a UI application, usually the UI event loop can be used as a replacement.

Regards,
Manu


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: Multi-threading questions

by Berend de Boer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>>> "Emmanuel" == Emmanuel Stapf [ES] <manus@...> writes:

    Emmanuel> `select' is very limited on Windows, it can only work with
    Emmanuel> socket by default (EiffelNet uses it internally). I'm not
    Emmanuel> sure how it is implemented in ePosix for Windows in a
    Emmanuel> general manner.

It isn't. Sockets only.

--
Cheers,

Berend de Boer


[Non-text portions of this message have been removed]


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: Multi-threading questions

by Patrick Ruckstuhl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Bernd,


> a couple for questions concerning the libraries delivered with ES and  
> multi-threading:
>
> 1) Is there a list which libraries and classes are 'thread-safe'?
>
> 2) Are there thread-safe data-structures? Is there an implementation of a  
> non-blocking queue?

There are some data structures in the thread extension library that can
abstract the multithreading for some situations

http://thread_extension.origo.ethz.ch/

Regards,
Patrick


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: Multi-threading questions

by Bernd Schoeller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 21 Apr 2008 02:34:23 +0200, Berend de Boer <berend@...>  
wrote:

>>>>>> "Emmanuel" == Emmanuel Stapf [ES] <manus@...> writes:
>
>     Emmanuel> `select' is very limited on Windows, it can only work with
>     Emmanuel> socket by default (EiffelNet uses it internally). I'm not
>     Emmanuel> sure how it is implemented in ePosix for Windows in a
>     Emmanuel> general manner.
>
> It isn't. Sockets only.
>

This is crap. How can such a basic functionality be missing?

Now I understand why so many Windows programmers love multi-threading.

*sigh*

Bernd



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Re: Multi-threading questions

by Berend de Boer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>>> "Bernd" == Bernd Schoeller <bernd.schoeller@...> writes:


    Bernd> This is crap. How can such a basic functionality be missing?

    Bernd> Now I understand why so many Windows programmers love
    Bernd> multi-threading.

Or switch to a decent platform :-)

--
Cheers,

Berend de Boer


[Non-text portions of this message have been removed]


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/eiffel_software/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/eiffel_software/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:eiffel_software-digest@...
    mailto:eiffel_software-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    eiffel_software-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/