feature request: add timeout to mailboxes
Excerpts from an email https://mailman.common-lisp.net/pipermail/ecl-devel/2019-March/011412.html
The mailbox API is incomplete, lacking timeout option. I don't know whether there is a common standard for it, but according to this - http://cl-cookbook.sourceforge.net/process.html at least LispWorks has such feature. Having timeout would be a really useful, consider this scenario: 1) Main thread continuously passes some data to ECL thread, waiting for ECL thread to process it. 2) ECL thread processes this data and returns it back to main thread; 3) Main thread continues execution, gathers new data, etc. Main thread --> ECL thread --> Main thread User is given full control over ECL thread, being able to change anything within it, mainly how data should be processed. What if user makes a mistake and something goes wrong, like: 1) Debugger is entered; 2) User input is requested; 3) An infinite loop is created. That would mean that execution of ECL thread is halted, halting execution of main thread in return. Program is stuck. A timeout would save from such situation: after x number of milliseconds passed execution would go back to the main thread and program wold not freeze. Main thread would know that something went wrong within ECL thread and could skip it next time until it receives notification that whatever problems had arisen in ECL thread were fixed. Sure, ignore-errors could be used to prevent debugger from breaking execution, but it would be much better to still being able to use it. Besides, ignore-errors will not save from problems 2 and 3 mentioned above.