Changes between Version 84 and Version 85 of LightweightConcurrency
- May 22, 2012 10:06:56 PM (22 months ago)
v84 v85 27 27 * [#UnreachableConcurrentDatastructure Unreachable Concurrent Datastructure] 28 28 * [#UnreachableScheduler Unreachable Scheduler] 29 * [#Safe -foreignCalls Safe-foreign Calls] 29 * [#Safeoreign Calls] 30 30 * [#RelatedWork Related Work] 31 31 … … 365 365 If an SCont is blocked with status `SContSwitched Yielded` has become unreachable, we run the SCont's finalizer, if installed. 366 366 367 == Safe -foreign Calls == 367 == Safeoreign Calls == 368 368 369 369 A safe foreign call does not impede the execution of other Haskell threads on the same scheduler, if the foreign call blocks. Before performing the foreign call, the task, say `T1`, releases the capability that it currently owns. This might wake up other tasks which are waiting to acquire a free capability. After the foreign call has completed, `T1` tries to reacquire the last owned capability. In the fast path, the foreign call quickly completes and `T1` reacquires the capability. In the slow path, some other task, say `T2`, acquires the capability.