This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
p3p's profile picture

Peripheral call dropping events

Started by p3p, 13 April 2015 - 10:42 PM
p3p #1
Posted 14 April 2015 - 12:42 AM
I'm writing a basic device manager that loads a driver for any peripheral that is attached or gets attached to a computer, this part works well, the issue I'm having is that events seem to be dropped during the peripheral call method, specifically I'm using a timer event to mediate my kernel execution and it disappears, I'm curious if this is by design, (like sleep ect) or if I'm being stupid.
HPWebcamAble #2
Posted 14 April 2015 - 12:47 AM
Can you post your code? You can put it on pastebin and put a link here if its more than a few hundred lines
Edited on 13 April 2015 - 10:47 PM
Bomb Bloke #3
Posted 14 April 2015 - 12:50 AM
It's by design, but it's by the design of whoever created the peripheral. Not all peripheral calls do it.
p3p #4
Posted 14 April 2015 - 01:33 AM
Ah that's disappointing not sure how to work around events randomly dropping
Bomb Bloke #5
Posted 14 April 2015 - 02:52 AM
The parallel API is the way to go in this sort of situation. This thread has an example of the sort of code you'd use.