1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-11 16:49:51 +01:00
Commit Graph

46 Commits

Author SHA1 Message Date
Stephen Coakley
8f22150160 Add methods for checking fork/thread availability and unsupported checks 2015-11-11 01:07:59 -06:00
Aaron Piotrowski
c25608c893 Refactor ContextInterface and add ProcessInterface 2015-10-20 00:06:43 -05:00
Aaron Piotrowski
c7de1ae603 Combine channel interfaces; remove executor classes 2015-10-18 01:54:09 -05:00
Aaron Piotrowski
ef5ab2f575 Update to icicleio/stream v0.4.0 2015-10-16 18:20:20 -05:00
Aaron Piotrowski
4eb815ea45 Automatically kill on destruct again 2015-09-18 22:20:35 -05:00
Aaron Piotrowski
7def2ae5a3 No longer call kill() in destructors
This means forks/processes/threads must be properly shutdown or killed before a reference is lost or the thread will continue to run indefinitely. This was necessary because forks were automatically killing other processes or threads due to calling kill() in the destructor.
2015-09-14 18:59:33 -05:00
Aaron Piotrowski
88c6a79f7e Null thread reference at shutdown 2015-09-08 12:55:29 -05:00
Aaron Piotrowski
79f4adb26a Actually fix kill threads 2015-09-06 14:59:24 -05:00
Aaron Piotrowski
b163207cea Fix killing a thread; avoid issues with signals 2015-09-05 12:52:56 -05:00
Aaron Piotrowski
ff44afde6d Remove Channel::createSocketPair(); refactor Thread 2015-09-04 16:22:41 -05:00
Aaron Piotrowski
c32e0ff9bf Fix potential fclose error when joining or killing thread 2015-09-02 17:24:01 -05:00
Aaron Piotrowski
94a80dc530 Remove synchronized() from threads 2015-09-02 17:23:22 -05:00
Aaron Piotrowski
45a54f3f78 Update Thread; add more tests 2015-09-02 16:34:42 -05:00
Aaron Piotrowski
c0ed3e3c05 Fix thread reporting being open after kill 2015-09-01 21:10:58 -05:00
Aaron Piotrowski
0e7944afea Check if thread is running before killing 2015-08-31 14:12:38 -05:00
coderstephen
1fe1374c8a Fix & improve tests; add thread start error check 2015-08-30 18:25:44 -05:00
coderstephen
25fbe7a9a8 Documentation & unused argument fixes 2015-08-30 17:52:00 -05:00
Aaron Piotrowski
4f49ea8b3f Reorganize internal classes; update ParcelInterface 2015-08-29 01:40:10 -05:00
coderstephen
9a4cdf7b40 Better running and kill detection 2015-08-28 16:18:02 -05:00
coderstephen
4a029630a0 Add checks to fix #3 on thread creation 2015-08-27 15:32:57 -05:00
Aaron Piotrowski
3dce08de42 Refine Process, context and worker updates 2015-08-27 13:06:39 -05:00
Aaron Piotrowski
0278fe7881 Work on workers, tasks, and contexts 2015-08-27 09:10:08 -05:00
Aaron Piotrowski
8ec2e93c56 Inherit only ini, functions, and classes 2015-08-26 21:34:41 -05:00
Aaron Piotrowski
8ecfe3df45 Replace acquire() method with synchronized() method 2015-08-25 09:53:17 -05:00
Aaron Piotrowski
afbed54754 Use constant for latency timeout 2015-08-25 09:39:58 -05:00
Aaron Piotrowski
b1427879d8 Pass streams to Channel constructor 2015-08-25 09:37:22 -05:00
Aaron Piotrowski
0e9b8cca4a Do not call fclose() in thread; separate read/write streams; addresses #4 2015-08-24 19:35:42 -05:00
coderstephen
ba3ac988b3 Merge changes from master 2015-08-24 10:47:36 -05:00
coderstephen
ad52ac9cf2 Remove ContextInterface & rename forks and threads 2015-08-22 16:27:44 -05:00
coderstephen
fed8de64aa Passing autoloader to child no longer necessary 2015-08-20 16:21:09 -05:00
coderstephen
dd38cd1142 Autoload behaves consistently with pthreads 2.0.11 2015-08-20 14:40:44 -05:00
coderstephen
d90ae70c22 Inherit all from parent and handle loader in child 2015-08-19 10:59:55 -05:00
Aaron Piotrowski
8c09c16204 Refine channel implementation 2015-08-18 19:12:58 -05:00
Aaron Piotrowski
36725728aa Add locks to thread context 2015-08-18 10:12:06 -05:00
Aaron Piotrowski
feb620fdea Refactor threading / simplify contexts 2015-08-10 17:38:58 -05:00
Aaron Piotrowski
1b77f37693 Add executor contexts, bind to executors instead of channel 2015-08-07 15:30:14 -05:00
Aaron Piotrowski
078f915081 Rebind $this to channel 2015-08-07 00:07:53 -05:00
Aaron Piotrowski
dc3cd5155e Add ability to pass arguments to context function 2015-08-06 23:25:04 -05:00
Aaron Piotrowski
399764f7b9 Remove file_exists() check 2015-08-06 21:51:45 -05:00
Aaron Piotrowski
c52ec19a38 Refactor contexts and exiting 2015-08-06 18:59:25 -05:00
coderstephen
1ece940057 Fix channel coroutines to yield correct values 2015-08-05 13:30:05 -05:00
coderstephen
ff413c904c First working, async threads using channels for messages
Channel was changed to return resources on creation.

Also, much better setting up synchronization at the beginning of a new
thread.
2015-08-05 02:48:43 -05:00
coderstephen
92432ff58b Experimental closure-based contexts 2015-07-26 17:53:00 -05:00
coderstephen
6442bb9191 Don't recursively create thread instances 2015-07-15 12:36:32 -05:00
coderstephen
3c4448866f Run given ThreadContext::run() inside thread 2015-07-14 17:15:10 -05:00
coderstephen
18b7c68f65 Experimental pthread context 2015-07-13 17:30:59 -05:00