Thanks Evil_Giraffe, I was coming to nearly the same solution.
I did digg into TPL, especially Producer/Consumer Patterns
My actual approach goes like:
UDP-Listener Raises an Event MessageIn (with the message in the Custom-eventargs)
GUI reacts on this event by putting the recieved message in a BlockingCollection (which would be the producer)
The Consumer is started by the GUI just after creating the UDP-Listener as a seperate Thread, it looks like this:
At the first look it does what I was looking for.Code:Private Sub MessageConsumer() Dim MessageIn as Byte() Do MessageIn=BlockingMessageCollection.Take Parse_Message(MessageIn) Loop End Sub




Reply With Quote