Dear PTB Community,
Are the Daq Toolbox functions "thread-safe"?
The rationale, here, is that I need to perform both DAQ input and output operations in a timely but asynchronous manner. Rather than pile all the jobs together into a single PTB program, I would rather run simultaneous copies of Matlab, and give each copy a different program to run. In this case, one program would be dedicated to DAQ output, another would be dedicated to DAQ input, and a final program would draw the stimulus.
We are using Linux on a multi-processor, multi-core machine with one USB-1208fs. It is possible, then, that the DAQ could receive an input and output command at the same time. If the underlying implementation is thread-safe then this wouldn't matter. The operations would automatically queue up and occur as quickly as the device could handle them. If they are not thread-safe, then sad things would happen.
This leads to a broader question of the "thread-safety" of PsychToolbox. I would not allow more than one copy of Matlab to run Screen( ) commands, and the like. But sometimes PTB seems to do a bit of initialisation. And that may or may not be process-specific. Could one copy of PTB Matlab accidentally reset system or graphics settings that had been placed by another?
Cheers,
Jackson
Are the Daq Toolbox functions "thread-safe"?
The rationale, here, is that I need to perform both DAQ input and output operations in a timely but asynchronous manner. Rather than pile all the jobs together into a single PTB program, I would rather run simultaneous copies of Matlab, and give each copy a different program to run. In this case, one program would be dedicated to DAQ output, another would be dedicated to DAQ input, and a final program would draw the stimulus.
We are using Linux on a multi-processor, multi-core machine with one USB-1208fs. It is possible, then, that the DAQ could receive an input and output command at the same time. If the underlying implementation is thread-safe then this wouldn't matter. The operations would automatically queue up and occur as quickly as the device could handle them. If they are not thread-safe, then sad things would happen.
This leads to a broader question of the "thread-safety" of PsychToolbox. I would not allow more than one copy of Matlab to run Screen( ) commands, and the like. But sometimes PTB seems to do a bit of initialisation. And that may or may not be process-specific. Could one copy of PTB Matlab accidentally reset system or graphics settings that had been placed by another?
Cheers,
Jackson