Thread Subject: Event queue

Subject: Event queue

From: Chris Rodgers

Date: 14 Feb, 2008 12:36:12

Message: 1 of 4

Hi,

A couple of event queue related items...

1) Is it possible to display the current Matlab event queue for
debugging purposes?

2) If I have a timer

t = timer

and then inside another routine, I set t.Running = 'off', will the
events for timer t that are already in the event queue be deleted, or
may the timer still end up running its callback after the long routine
completes?

Thanks,

Chris.

Subject: Event queue

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 14 Feb, 2008 17:09:05

Message: 2 of 4

In article <fp1cjs$8rl$2@frank-exchange-of-views.oucs.ox.ac.uk>,
Chris Rodgers <rodgers@physchem.NOSPAMox.aREMOVEc.uk> wrote:

>A couple of event queue related items...

>1) Is it possible to display the current Matlab event queue for
>debugging purposes?

I don't know, but I see that someone has coded FlushEvents.m
to remove all events of a given kind from the Matlab queue.
Usually if you have enough access to the queue to be able to
examine an event to be able to flush it, you would have enough
access to be able to display it, but this is not always true;
I suggest checking out the code (www.koders.com)


>2) If I have a timer

>t = timer

>and then inside another routine, I set t.Running = 'off', will the
>events for timer t that are already in the event queue be deleted, or
>may the timer still end up running its callback after the long routine
>completes?

According to the documentation for timer(), the Running field
is read-only.
--
  "I will not approve any plan which is based on the old principle
  of build now and repair later." -- Walter Hickle

Subject: Event queue

From: Ryan Ollos

Date: 28 Nov, 2008 23:20:04

Message: 3 of 4

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in message <fp1sjh$9iu$1@canopus.cc.umanitoba.ca>...
> In article <fp1cjs$8rl$2@frank-exchange-of-views.oucs.ox.ac.uk>,
> Chris Rodgers <rodgers@physchem.NOSPAMox.aREMOVEc.uk> wrote:
>
> >A couple of event queue related items...
>
> >1) Is it possible to display the current Matlab event queue for
> >debugging purposes?
>
> I don't know, but I see that someone has coded FlushEvents.m
> to remove all events of a given kind from the Matlab queue.
> Usually if you have enough access to the queue to be able to
> examine an event to be able to flush it, you would have enough
> access to be able to display it, but this is not always true;
> I suggest checking out the code (www.koders.com)

Hello Walter,

I have the same question as Chris. I have not been able to find the FlushEvents.m that you refer to, either on the FEX or koders.com. Could you post a direct link?

Subject: Event queue

From: Walter Roberson

Date: 1 Dec, 2008 22:57:21

Message: 4 of 4

Ryan Ollos wrote:
> roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote in message <fp1sjh$9iu$1@canopus.cc.umanitoba.ca>...

>> I don't know, but I see that someone has coded FlushEvents.m
>> to remove all events of a given kind from the Matlab queue.

> I have not been able to find the FlushEvents.m that you refer to,

What I was able to find this time was a part of (the old version of?) psych tools,
and reading around a bit it appeared to call a mex routine, and on MS Windows apparently
that mex routine is restricted to removing keyboard presses (with more functionality under
Mac OS.) Not what I'd call a real interface to the Matlab event queue :(

(Note: I have made no attempt myself to figure out how the Matlab event queue operates.)

--
.signature note: I am now avoiding replying to unclear or ambiguous postings.
Please review questions before posting them. Be specific. Use examples of what you mean,
of what you don't mean. Specify boundary conditions, and data classes and value
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com