Re: [BLACKBOX] Long running command and Dialog.ShowStatus

From: Campbell, Robert (SELEX GALILEO, UK) <robert.d.campbell{([at]})nowhere.xy>
Date: Fri, 4 Dec 2009 09:34:33 -0000

----boundary-LibPST-iamunique-4986443_-_-
Content-type: text/plain

I am neither a computer scientist or Windows expert, so am rather slow
to understand some of this.

What is the implication of "shouldn't be needed in modern, well-written
applications"? Is it that that my programs are not modern and
well-written,
or is it that BlackBox is not?

If threads are the answer that I (and obviously some other people) are
looking
for how do we exploit them?

Cheers

Robert


PS - What is "Dijkstra's loop"; even Google doesn't seem to know?


>> >-----Original Message-----
>> >From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> >Sent: Friday, 4 December 2009 9:04 AM
>> >
>> >Surely these problems (apparent hanging of BlackBox, and the
>> >fact that Ctrl-Break does not work as advertised) can and
>> >should be solved at a lower level than imposing lots of
>> >awkward logic into every application?
>> >
>>
>> I suspect not as these problems are *application-specific*
>> and under the
>> control of the application programmer. If you develop a
>> single-threaded
>> Windows application it can only respond to user interaction
>> while it is
>> 'idle' and not involved in any other processing. A relevant
>> article "Using
>> Messages and Message Queues" is at:
>>
>> http://msdn.microsoft.com/en-us/library/ms644928(VS.85).aspx
>>
>> Note the comment added to the end:
>>
>> "Lengthy operations should always be done in a separate thread ...
>> PeekMessage shouldn't be needed in modern, well-written
>> applications."
>>
>> Regards,
>> Chris
>>
>> --
>> Chris Burrows
>> CFB Software
>> Armaide: ARM Oberon-07 Development System
>> http://www.cfbsoftware.com/armaide
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-4986443_-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xccGFyDQpBIGNvbXBhbnkgcmVnaXN0ZXJlZCBpbiBFbmds
YW5kICYgV2FsZXMuICBDb21wYW55IG5vLiAwMjQyNjEzMlxwYXINCioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHBhcg0K
VGhpcyBlbWFpbCBhbmQgYW55IGF0dGFjaG1lbnRzIGFyZSBjb25maWRlbnRpYWwgdG8gdGhlIGlu
dGVuZGVkXHBhcg0KcmVjaXBpZW50IGFuZCBtYXkgYWxzbyBiZSBwcml2aWxlZ2VkLiBJZiB5b3Ug
YXJlIG5vdCB0aGUgaW50ZW5kZWRccGFyDQpyZWNpcGllbnQgcGxlYXNlIGRlbGV0ZSBpdCBmcm9t
IHlvdXIgc3lzdGVtIGFuZCBub3RpZnkgdGhlIHNlbmRlci5ccGFyDQpZb3Ugc2hvdWxkIG5vdCBj
b3B5IGl0IG9yIHVzZSBpdCBmb3IgYW55IHB1cnBvc2Ugbm9yIGRpc2Nsb3NlIG9yXHBhcg0KZGlz
dHJpYnV0ZSBpdHMgY29udGVudHMgdG8gYW55IG90aGVyIHBlcnNvbi5ccGFyDQoqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KlxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3Nh
Z2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04u
Q0h9fQAAAABA
----boundary-LibPST-iamunique-4986443_-_---
Received on Fri Dec 04 2009 - 10:34:33 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:39 UTC