----boundary-LibPST-iamunique-1939071307_-_-
Content-type: text/plain
On Wed, 19 Feb 2003, Martin, Marc wrote:
> >I am acquiring data
> >from a USB device using the standard Windows call
> >WinApi.DeviceIoControl. This call appears to be blocking,
> >i.e., it does not return unless the device sends the
> >requested data. In case the device does not have data,
> >the call stalls, and as a consequence BlackBox becomes
> >unresponsive (an hour glass appears on screen).
>
> Couldn't you simply use Blackbox's "Services.Action"
> routines to prevent the Blackbox framework from
> being unresponsive?
I do not think so. You have answered this question yourself below.
I have encountered the same problem. In case the WinApi.DeviceIoControl
does not return immediately, the single thread is blocked until it does.
I know from Wirth original books on Oberon System that "single
process multitasking" is advantageous in terms of the system
design. Multithreading must be more complicated because of the
thread synchronization, semaphores, and such. This is the
first time I encountered a problem which lets me think that
multithreading may be the solution. However, I do not know
how much we would gain versus how much we would lose in terms
of the BlackBox complexity.
>
> Although I'll always second any suggestion to improve
> the multi-threading capabilities of Blackbox -- I've been
> suggesting this since 1996! In my case, I have a long
> running command which calls a Fortran DLL which in
> turns calls my Blackbox code. Unfortunately, whenever
> the Fortran DLL is being executed, the Blackbox
> framework becomes unresponsive and I can no longer
> do anything in it until the Fortran DLL is finished.
> And there doesn't appear to be any way to use the
> "Services.Action" routines to fix this. I also once
> tried using Windows process threads to try to workaround
> this, but this caused the Blackbox framework to crash.
Wojtek Skulski skulski{([at]})nowhere.xy
--------------------------------------------
To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
blackbox-request{([at]})nowhere.xy
To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
Send any problem reports or questions related to this email list to the list owner at
owner-blackbox{([at]})nowhere.xy
Current posting policy:
a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
----boundary-LibPST-iamunique-1939071307_-_-
Content-type: application/rtf
Content-transfer-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