MaDKit forum

Welcome All !
Please, use explicit topic names when creating new threads. Thanks.

You are not logged in.

#1 2014-03-08 19:44:13

jo
Member
Registered: 2014-02-23
Posts: 10

How an agent can listen at two messages at once

Hi,

It's possible that an agent listen (waitNextMessage) at more than one message on the same time?

Thanks.

Last edited by jo (2014-03-08 19:55:21)

Offline

#2 2014-03-09 12:32:56

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 176
Website

Re: How an agent can listen at two messages at once

Hi,

waitNextMessage only returns one message at a time. What is the usecase that you have in mind exactly ?

Offline

#3 2014-03-09 15:20:11

jo
Member
Registered: 2014-02-23
Posts: 10

Re: How an agent can listen at two messages at once

It's the case When an agent listen at two messages from two agents having different behaviors and through different streams.

Offline

#4 2014-03-10 08:31:00

fmichel
Administrator
From: Montpellier
Registered: 2009-03-24
Posts: 176
Website

Re: How an agent can listen at two messages at once

Well, you can write some code so that you wait for the two messages at the same time before continuing, but you will receive them one by one using waitNextMessage.

Offline

Board footer