File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 38
38
39
39
-----------------------------------------------------------
40
40
41
- Non-blocking i/o:
41
+ Non-blocking i/o (perfectly synchronized):
42
+
43
+ worker1: 2ms to finish
44
+ worker2: 2ms to finish
45
+ worker3: 2ms to finish
46
+
47
+ server reads result: 0.5ms (r)
48
+ server writes new job: 0.5ms (w)
49
+ cpu time available for extra non-i/o work: (+)
50
+ waiting for i/o: (.)
51
+
52
+ time: 0 1 2 3 4 5 6 7
53
+ worker1: r++r++r++w++w++w r++r++r++w++w++w
54
+ worker2: r++r++r++w++w++w r++r++r++w++w++w
55
+ worker3: r++r++r++w++w++w r++r++r++w++w++w
56
+ server: ++++++++++
57
+
58
+ -----------------------------------------------------------
59
+
60
+ Non-blocking i/o (not synchronized):
42
61
43
62
worker1: 3ms to finish
44
63
worker2: 2ms to finish
@@ -156,7 +175,6 @@ private function createServerSocket() {
156
175
157
176
if ( !$ this ->serverSocket )
158
177
throw new \Exception ( 'Could not create a server: ( ' . $ errNum .') ' . $ errStr );
159
-
160
178
}
161
179
162
180
private function createWorkerProcs ( $ count ) {
@@ -175,7 +193,6 @@ private function createWorkerProcs( $count ) {
175
193
$ workers [] = $ process ;
176
194
}
177
195
178
-
179
196
$ this ->workerProcs = $ workers ;
180
197
}
181
198
You can’t perform that action at this time.
0 commit comments