At 12:15 -0500 1/3/04, Uri Guttman wrote:
 >>>>> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
  LT> These are platform specific details. We will use whatever the
  LT> platform/OS provides. In the source code its a LOCK() UNLOCK() pair.
  LT> The LOCK() can be any atomic operation and doesn't need to call the
  LT> kernel, if the lock is aquired.
if it doesn't call the kernel, how can a thread be blocked?

Think out of the box!


Threads can be blocked in many ways. My forks.pm module uses sockets to block threads ;-).

It sucks performance wise, but it beats the current perl ithreads implementation on many platforms in many situations.

Therefore my motto: whatever works, works.


...you can't
have user level locks without spinning. at some point (even with fibres)
you need to make a kernel call so other threads can run.

Possibly. I don't know enough of the specifics whether this is true or not.



the macro layer
will make the mainline source look better but you still need kernel
calls in their definition.

Possibly again. But remember, since Parrot started, hardware has roughly grown a factor of 4 in power (if I'm to believe in Moore's law)..




Liz

Reply via email to