mirror of
https://github.com/danog/parallel.git
synced 2024-11-26 20:34:40 +01:00
Add panic method for panicking a context from either side
This commit is contained in:
parent
8ac9301105
commit
b9cef10633
@ -35,6 +35,14 @@ interface ContextInterface extends SynchronizableInterface
|
||||
*/
|
||||
public function kill();
|
||||
|
||||
/**
|
||||
* Causes the context to immediately panic.
|
||||
*
|
||||
* @param string $message A panic message.
|
||||
* @param int $code A panic code.
|
||||
*/
|
||||
public function panic($message = '', $code = 0);
|
||||
|
||||
/**
|
||||
* Gets a promise that resolves when the context ends and joins with the
|
||||
* parent context.
|
||||
|
Loading…
Reference in New Issue
Block a user