1
0
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:
coderstephen 2015-08-03 15:10:59 -05:00
parent 8ac9301105
commit b9cef10633

View File

@ -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.