Re: Running a background task



On May 15, 4:31 pm, Adam Beneschan <a...@xxxxxxxxxx> wrote:
When Handle_Msg calls on the On_String entry, this starts a
rendezvous, and Handle_Msg stops when the rendezvous is done. Since
the "accept" has a "do" part, the rendezvous will not be done until
the "do" completes, which in your case never happens. Thus,
Handle_Msg will never proceed past the entry call.

It's hard for me to give a solution, since I don't know just what
you're trying to accomplish; but you may want to move the loop out of
the "accept".

-- Adam

I need to poll the device every 3 seconds. If I move the loop outside
of the accept, won't it just call Send_Status_Req procedure one time,
then finish the task?

Surely there must be a mechanism similar to C's pthread that allows me
to start a thread and let it worry about itself, while the main thread
continues processing. All I'm seeing here is that the task is run in
parallel to the other code in the Handle_Msg procedure. I wan't that
procedure to finish up, and let the rest of the program continue to
run, all with Poll_For_Status running in the background.
.



Relevant Pages

  • Re: Running a background task
    ... Handle_Msg will never proceed past the entry call. ... If I move the loop outside ... confusing to you, you may need to explain a little more clearly what ...
    (comp.lang.ada)
  • RE: Creating a que
    ... and entry count in a collection. ... if eo.Count> 0 then bMoreData = True ... At the beginning of the loop you assume this is the last time through the ... Then you go through each item in the Entries ...
    (microsoft.public.excel.programming)
  • RE: Creating a que
    ... and entry count in a collection. ... if eo.Count> 0 then bMoreData = True ... At the beginning of the loop you assume this is the last time through the ... Then you go through each item in the Entries ...
    (microsoft.public.excel.programming)
  • Re: Very confused by Ada tasking, can not explain the execution outcome.
    ... I am trying to simulate a concurrent resource allocator with Ada's ... task and protected type. ... entry calls, so no entry is defined in tasks. ... loop, 'while rounds<2 loop', how could it get out of the loop if ...
    (comp.lang.ada)
  • Re: How to Delete Rows in Excel In a Do Loop
    ... have to delete there are some that have a entry in each and every cell ... Richard Buttrey wrote: ... time you go through the loop. ... Now copy this formula down column A for the whole database ...
    (microsoft.public.excel.worksheet.functions)

Loading