Forums > MaxMSP

udpreceive: scheduler or queue?

October 25, 2006 | 12:15 am

Hi,

Having read "Event Priority in Max (Scheduler vs. Queue)"
(http://www.cycling74.com/story/2005/5/2/133649/9742)
i wonder where it is documented which event run in
scheduler thread and which events in the queue thread.
the above article only provides a partial list
- scheduler: metro, MIDI in
- queue: mouse click, key press

In particular, i would like to know at what priority incoming network
traffic is handled.
for example [udpreceive]

aTdHvAaNnKcSe
-jennek


October 25, 2006 | 5:25 am

If you look in the Java help folder inside Application
Support/Cycling’74, there’s a java utilitiy for mxj that tels what
thread the incoming signal belongs in.

Best,
Trond

jennek geels wrote:
> Hi,
>
> Having read "Event Priority in Max (Scheduler vs. Queue)"
> (http://www.cycling74.com/story/2005/5/2/133649/9742)
> i wonder where it is documented which event run in
> scheduler thread and which events in the queue thread.
> the above article only provides a partial list
> – scheduler: metro, MIDI in
> – queue: mouse click, key press
>
> In particular, i would like to know at what priority incoming network
> traffic is handled.
> for example [udpreceive]
>
> aTdHvAaNnKcSe
> -jennek


October 25, 2006 | 8:29 am

Allright!! Of course, that is the solution!

The question was how to make people aware of the importance of knowing how the threading system works. The answer might just be one native max object that indicates the priority/thread of an incoming event. Give it a clear helpfile and a chapter in the tutorials and there we are!

No more threads such as these:

http://www.cycling74.com/forums/index.php?t=msg&rid=3579&S=d947411bd8328c9d383a9e68528481a2&th=22112&goto=81507#msg_81507

How about that, cycling?

*excited* cheers,
Mattijs


October 25, 2006 | 9:23 am

This is exactly the tool that I needed.
hartelijk dank, Trond!

the answer to my question is:
udpreceive events run in the scheduler.

So I need to put in a jit.qball between the udprecieve and
OpenSoundControl to solve my event backlog.
If only I knew if it is safe to usurp the FullPacket that udprecieve
sends to OpenSoundControl.
If usurped, how is the memory of the FullPAcket released?
As I understand it, the FullPAcket message is a pointer to a buffer
pool.
Someone has to release it.

-jennek

On 25-okt-2006, at 5:25, Trond Lossius wrote:

> If you look in the Java help folder inside Application Support/
> Cycling’74, there’s a java utilitiy for mxj that tels what thread
> the incoming signal belongs in.
>
> Best,
> Trond
>
> jennek geels wrote:
>> Hi,
>>
>> Having read "Event Priority in Max (Scheduler vs. Queue)"
>> (http://www.cycling74.com/story/2005/5/2/133649/9742)
>> i wonder where it is documented which event run in
>> scheduler thread and which events in the queue thread.
>> the above article only provides a partial list
>> – scheduler: metro, MIDI in
>> – queue: mouse click, key press
>>
>> In particular, i would like to know at what priority incoming
>> network traffic is handled.
>> for example [udpreceive]
>>
>> aTdHvAaNnKcSe
>> -jennek
>


October 25, 2006 | 9:30 am

On 25-okt-2006, at 8:29, Mattijs Kneppers wrote:

>
> Allright!! Of course, that is the solution!
>
> The question was how to make people aware of the importance of
> knowing how the threading system works. The answer might just be
> one native max object that indicates the priority/thread of an
> incoming event. Give it a clear helpfile and a chapter in the
> tutorials and there we are!

I second that.
Even after so many years with max, I still have a fragmented image of
scheduler and queue.
Documentation is fragmented:
- there is an article somewhere on the cycling site
- there is some info in the max SDK
- there is some more in the java SDK
and there is no list of which events run in what threads AFAIK.
the tool Trond pointed out is a real treasure, but is is well hidden.
and no map.

Please consolidate all this information in one place.
I am glad to assist you if that would help.

> How about that, cycling?
>
> *excited* cheers,
> Mattijs

equally excited,
Jennek


October 25, 2006 | 9:51 am

Quote: Jennek Geels wrote on Wed, 25 October 2006 11:30
—————————————————-
> I am glad to assist you if that would help.

Same here.


October 25, 2006 | 3:26 pm

On 25-okt-2006, at 9:51, Mattijs Kneppers wrote:
> Quote: Jennek Geels wrote on Wed, 25 October 2006 11:30
> —————————————————-
>> I am glad to assist you if that would help.
>
> Same here.

actually the story at http://www.cycling74.com/story/
2005/5/2/133649/9742
is a very good starting point. As to improvements, I suggest:
- promote it to a chapter in the max Topics manual.
- add a few details that the author (JKC) assumes to be known but
that I did not
know the first time I read it.
- add a few example patches, including the WhichThread.help tool.

Right now I am busy preparing for a public showing of our new
installation,
but next week I will elaborate on the second point above.

-jennek


October 25, 2006 | 3:46 pm

Good resources would benefit us since at the moment I have to explain the theory of this to every new trainee/employee. Perhaps Jennek, if you care to share your efforts with me I could add some stuff here and there to ‘make things better’ ;) One could say I have some experience in this field, I composed and managed the manual of the software studio Buzz (www.buzzmachines.com) for years (www.oli.tudelft.nl/avdl1064/buzzmanual), until development of buzz stopped and the program slowly became obsolete.

Greets,
Mattijs


October 25, 2006 | 10:18 pm

I agree absolutely. This is the most occult aspect of Max, the least
well-documented, and the source of many of the more bizarre problems
- which can be nearly impossible to track down.

Ben

On 25 Oct 2006, at 13:29, jennek geels wrote:

>
> On 25-okt-2006, at 8:29, Mattijs Kneppers wrote:
>
>>
>> Allright!! Of course, that is the solution!
>>
>> The question was how to make people aware of the importance of
>> knowing how the threading system works. The answer might just be
>> one native max object that indicates the priority/thread of an
>> incoming event. Give it a clear helpfile and a chapter in the
>> tutorials and there we are!
>
>
> I second that.
> Even after so many years with max, I still have a fragmented image
> of scheduler and queue.
> Documentation is fragmented:
> – there is an article somewhere on the cycling site
> – there is some info in the max SDK
> – there is some more in the java SDK
> and there is no list of which events run in what threads AFAIK.
> the tool Trond pointed out is a real treasure, but is is well hidden.
> and no map.
>
> Please consolidate all this information in one place.
> I am glad to assist you if that would help.
>
>> How about that, cycling?
>>
>> *excited* cheers,
>> Mattijs
>
> equally excited,
> Jennek
>


Viewing 9 posts - 1 through 9 (of 9 total)