Open GoogleCodeExporter opened 9 years ago
Hello,
attached you will find a patch that fixes the problem. The drawback is that the
task parameter now contains the task_handle (an integer) not the task object
itself so you need to fix that in your AI_callback.py.
Maybe it would be a good idea to register a local callback that calls the
callback given by the user, using the task object as parameter and maybe also a
data array.
I also suggest to update the documentation as it was very confusing for me when
I first tried to use this event. I can come up with a patch for that but I
would like to know other opinions about the local callback part.
I guess that the done_event and signal_event have the same problem which can be
fixed the same way, but I haven't tested this.
Best wishes,
Tobias
Original comment by m...@tobiasgehring.de
on 29 Aug 2010 at 1:33
Attachments:
I 'fixed' this - although it is probably not fully thread-safe. The callback
function now gets:
* a Task object from the Task cache, so no new Tasks are created in the callback
* the data retrieved from the DAQ card (instead of the number of samples).
It's a breaking API change, though, I guess. A more simple patch would not add
the data as a parameter, which won't break the API.
Original comment by valhall...@gmail.com
on 24 Feb 2011 at 1:43
Attachments:
Original issue reported on code.google.com by
liujiny...@gmail.com
on 28 Apr 2010 at 8:37Attachments: