concurrency.mailboxes: break dependency on debugger vocab by creating concurrency.mailboxes.debugger
parent
8be8c7f213
commit
372d2dc363
|
@ -0,0 +1 @@
|
||||||
|
Slava Pestov
|
|
@ -0,0 +1,8 @@
|
||||||
|
! Copyright (C) 2010 Slava Pestov.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: debugger accessors debugger.threads kernel
|
||||||
|
concurrency.mailboxes ;
|
||||||
|
IN: concurrency.mailboxes.debugger
|
||||||
|
|
||||||
|
M: linked-error error.
|
||||||
|
[ thread>> error-in-thread. ] [ error>> error. ] bi ;
|
|
@ -2,8 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: dlists deques threads sequences continuations namespaces
|
USING: dlists deques threads sequences continuations namespaces
|
||||||
math quotations words kernel arrays assocs init system
|
math quotations words kernel arrays assocs init system
|
||||||
concurrency.conditions accessors debugger debugger.threads
|
concurrency.conditions accessors locals fry vocabs.loader ;
|
||||||
locals fry ;
|
|
||||||
IN: concurrency.mailboxes
|
IN: concurrency.mailboxes
|
||||||
|
|
||||||
TUPLE: mailbox { threads dlist } { data dlist } ;
|
TUPLE: mailbox { threads dlist } { data dlist } ;
|
||||||
|
@ -77,9 +76,6 @@ M: mailbox mailbox-get-timeout block-if-empty data>> pop-back ;
|
||||||
|
|
||||||
TUPLE: linked-error error thread ;
|
TUPLE: linked-error error thread ;
|
||||||
|
|
||||||
M: linked-error error.
|
|
||||||
[ thread>> error-in-thread. ] [ error>> error. ] bi ;
|
|
||||||
|
|
||||||
C: <linked-error> linked-error
|
C: <linked-error> linked-error
|
||||||
|
|
||||||
: ?linked ( message -- message )
|
: ?linked ( message -- message )
|
||||||
|
@ -95,3 +91,5 @@ M: linked-thread error-in-thread
|
||||||
|
|
||||||
: spawn-linked-to ( quot name mailbox -- thread )
|
: spawn-linked-to ( quot name mailbox -- thread )
|
||||||
<linked-thread> [ (spawn) ] keep ;
|
<linked-thread> [ (spawn) ] keep ;
|
||||||
|
|
||||||
|
{ "concurrency.mailboxes" "debugger" } "concurrency.mailboxes.debugger" require-when
|
||||||
|
|
Loading…
Reference in New Issue