388 |
388 |
389 "Created: / 26-05-2014 / 21:31:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
389 "Created: / 26-05-2014 / 21:31:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
390 "Modified: / 02-10-2018 / 13:37:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
390 "Modified: / 02-10-2018 / 13:37:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
391 ! ! |
391 ! ! |
392 |
392 |
|
393 !GDBConnection methodsFor:'queries'! |
|
394 |
|
395 hasPendingCommands |
|
396 | anyCommandEventPending | |
|
397 |
|
398 "/ This is more tricky. There are pending commands if: |
|
399 "/ |
|
400 "/ * there's at least one GDBCommandEvent in event queue |
|
401 "/ (command it sent on API level but not yet sent to GDB), or |
|
402 "/ * there's at least one outstanding command (command has been |
|
403 "/ sent to GDB but response not yet arrived), or |
|
404 "/ * there's at least one GDBCommandResultEvent (command response |
|
405 "/ was received but not yet dispatched and handled. |
|
406 "/ |
|
407 "/ |
|
408 outstandingCommands notEmpty ifTrue:[ ^ true ]. |
|
409 |
|
410 "/ Here, synchronization is required since we iterate over |
|
411 "/ collection... |
|
412 eventQueueLock critical:[ |
|
413 anyCommandEventPending := eventQueue anySatisfy:[:e|e class == GDBCommandEvent or:[e class == GDBCommandResultEvent ] ] |
|
414 ]. |
|
415 ^ anyCommandEventPending |
|
416 |
|
417 "Created: / 23-01-2019 / 20:50:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
418 ! |
|
419 |
|
420 hasPendingEvents |
|
421 |
|
422 "/ Note that there's no obligation for this information to |
|
423 "/ be 100% accurate, so no need for symchronization here. |
|
424 ^ eventQueue notEmpty. |
|
425 |
|
426 "Created: / 23-01-2019 / 20:41:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
427 ! ! |
|
428 |
393 !GDBConnection class methodsFor:'documentation'! |
429 !GDBConnection class methodsFor:'documentation'! |
394 |
430 |
395 version_HG |
431 version_HG |
396 |
432 |
397 ^ '$Changeset: <not expanded> $' |
433 ^ '$Changeset: <not expanded> $' |