chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] srfi-18 and callbacks


From: Jim Ursetto
Subject: [Chicken-users] srfi-18 and callbacks
Date: Sat, 5 Apr 2008 12:10:35 -0600

Let's say I have two callback handlers registered and within the handlers I do
a thread-sleep! or thread-yield!.  The C caller is the same for both (it's a
busy handler), they are just invoked with different data.  Now this sequence of
events occurs:

thread 1 enters the callback
thread 2 enters the callback
thread 1 returns from the callback

The strange results I get seem to indicate thread 1 is returning to C using the
stack of thread 2.

Is my approach fundamentally flawed?  If this explanation doesn't make sense,
I can try to write a self-contained demonstration.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]