Skip to content

Instantly share code, notes, and snippets.

@thecodedrift
Created August 17, 2012 22:23
Show Gist options
  • Select an option

  • Save thecodedrift/3383249 to your computer and use it in GitHub Desktop.

Select an option

Save thecodedrift/3383249 to your computer and use it in GitHub Desktop.
Snaptest and PHP Isolation Testing
<?php
class Dispatcher {
public function dispatch($call, $key_stack, $options = array()) {
// ... set up an array for child processes
// ... dispatch, collect round robin
// ... got a complete response from a child
call_user_func_array($options['thread_complete_callback'], array($results));
// ... continue until all dispatches are made for $key_stack
// ... dispatch complete callback
return call_user_func_array($options['dispatch_complete_callback'], array($results));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment