This site requires JavaScript, please enable it in your browser!
Greenfoot back
MrBradley
MrBradley wrote ...

2017/12/27

ThreadAct / Update

MrBradley MrBradley

2017/12/27

#
Davin, I've returned to ThreadAct after doing some work on my own, and I was wondering if you might like to work with me on updating it to use a MessagePump approach vs an array of sequences. I have a similar scenario where each actor places action messages (sequences) into a message queue, and has an associated thread that executes it and relinquishes control. The message queue is implemented using a BlockingQueue, and I was thinking of setting its size to one (1) and have that auto block until the next message appears in the queue. Another revision would be to use Functional Interfaces and lambdas for each action sequence (doRun). Let me know. Cheers
You need to login to post a reply.