--- Coro/README 2007/10/05 10:57:40 1.10 +++ Coro/README 2007/10/06 19:25:00 1.11 @@ -229,6 +229,21 @@ This method simply sets the "$coroutine->{desc}" member to the given string. You can modify this member directly if you wish. + $coroutine->throw ([$scalar]) + If $throw is specified and defined, it will be thrown as an + exception inside the coroutine at the next convinient point in time + (usually after it gains control at the next schedule/transfer/cede). + Otherwise clears the exception object. + + The exception object will be thrown "as is" with the specified + scalar in $@, i.e. if it is a string, no line number or newline will + be appended (unlike with "die"). + + This can be used as a softer means than "cancel" to ask a coroutine + to end itself, although there is no guarentee that the exception + will lead to termination, and if the exception isn't caught it might + well end the whole program. + GLOBAL FUNCTIONS Coro::nready Returns the number of coroutines that are currently in the ready