Re: Threads?

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 9 Oct 2002, at 16:00, Robert Craig wrote:

> 
> Jonas Temple writes:
> > I know this has been discussed in the past 
> > but is there any plans in the near future for 
> > thread in Euphoria?
> 
> Not in the near future.
> There are a lot of thorny issues regarding threads,
> and only a small percentage of people would likely use them.
> It would be an interesting thing to do at some time.
> 
> One thorny problem is the issue of "thread-safe" library routines.
> Many C library routines, as well as some Euphoria run-time
> routines are not necessarily "thread-safe". For example, if one
> thread was executing in the middle of malloc(), and then 
> control passed suddenly to another thread which then 
> called malloc(), you could corrupt the heap. I think the 
> Microsoft compiler has a version of the C run-time 
> that is thread-safe, and another (faster one) that isn't.
> 
> > I've recently had occasions where I could use threads in Euphoria, 
> > particularly for functions that could run a long time (database 
> > retrieval).
> 
> You can today, run multiple Euphoria *processes*, 
> i.e. separate programs, which can communicate 
> via files or shared memory. This gives you parallelism, 
> but at a coarser level than threads, i.e. the context
> switching is slower.

Or use socks. Or DDE (windoze only?). Other than socks or dde, is there 
any way to signal the other process(es) that there is work to be done?

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu