Commit 95d6d83
committed
Improve synchronisation for parent-child messages
This new model will have the parent process wait until IocInit() has
successfully completed before continuing with the test
The child process had need to do a queue.put() followed immediately by a
queue.get(). On most platforms the main process would interuupt by
pulling from the queue, but this was not guaranteed. To solve this using
queues would have required a second queue for signalling.
We work around this by using Pipes instead. These provide the
read-write semantics we want - the ability to wait for an explicit message
from the parent process - without needing a side-channel for more
signalling.
Hopefully this will fix the MacOS issues where it seemed caget was
returning values from a previous iteration of the tests, possibly
because the test process was running much faster than the child process
could keep up with.1 parent 2e9f37c commit 95d6d83
1 file changed
+31
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
322 | | - | |
323 | | - | |
| 324 | + | |
| 325 | + | |
324 | 326 | | |
325 | | - | |
326 | | - | |
327 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
| |||
343 | 349 | | |
344 | 350 | | |
345 | 351 | | |
346 | | - | |
347 | | - | |
348 | | - | |
| 352 | + | |
349 | 353 | | |
350 | 354 | | |
351 | 355 | | |
352 | | - | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
356 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
357 | 367 | | |
358 | 368 | | |
359 | 369 | | |
| |||
375 | 385 | | |
376 | 386 | | |
377 | 387 | | |
378 | | - | |
379 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
380 | 393 | | |
381 | 394 | | |
382 | 395 | | |
383 | 396 | | |
384 | 397 | | |
385 | 398 | | |
386 | | - | |
387 | | - | |
| 399 | + | |
| 400 | + | |
388 | 401 | | |
389 | 402 | | |
390 | 403 | | |
391 | 404 | | |
392 | 405 | | |
393 | 406 | | |
394 | 407 | | |
395 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
396 | 412 | | |
397 | 413 | | |
398 | 414 | | |
| |||
0 commit comments