Re: listen (sock, back)

new topic     » goto parent     » topic index » view thread      » older message » newer message
FredRansom said...

I'm not familiar with threads in EU 4. Is their any documentation for them? Threads work fine in VB, C#, and C, so perhaps I can tweak the OS thread prioritization.

Euphoria code does not use native threads. For non-Windows implementations of euphoria's multi-tasking system, pthreads were used to implement them. The windows implementation was done with fibers, which provide native cooperative multitasking.

The original method of switching between stacks didn't work with (at least) newer Linux kernels. I think that some anti-stack smashing features were responsible for the breakage.

Basically, we use threads and mutexes to ensure that only one task runs at any time.

As for using native threads with a euphoria program...there are issues with the euphoria back end that would currently prevent this from working. I suppose it might be possible to hack up some translated code that could be threaded, but even then, the runtime libraries aren't thread safe. I couldn't say if this will ever change.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu