A now, B later

20 views
Skip to first unread message

Donald McLean

unread,
Mar 10, 2016, 7:22:36 AM3/10/16
to liftweb
Hi all,

This is a pattern/design question.

I have a piece of code, it turns out that after I complete part A, I have to give up the thread and wait for something else to happen before I can come back and complete part B. This is the first time I've had this kind of thing in a program, but I expect to see more of it.

I wrote something using a Lift Actor that works, but I was wondering if there were any documented patterns for this kind of thing.

Thanks,

Donald

Matt Farmer

unread,
Mar 10, 2016, 11:04:52 AM3/10/16
to lif...@googlegroups.com
Can the thing you're waiting on for Part B send a message to your Actor?


Matt Farmer Blog | Twitter
GPG: CD57 2E26 F60C 0A61 E6D8  FC72 4493 8917 D667 4D07
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Farmer

unread,
Mar 10, 2016, 11:07:19 AM3/10/16
to lif...@googlegroups.com
Oh sorry. Didn't read your message closely enough.  Lol. 

Yeah I usually use actors. Check out this repo I've been working on. If you feel dissatisfied with how it's working. Mu examples are in Akka but the same patterns work with lift. 




Matt Farmer Blog | Twitter
GPG: CD57 2E26 F60C 0A61 E6D8  FC72 4493 8917 D667 4D07

Brett Grace

unread,
Mar 10, 2016, 5:23:23 PM3/10/16
to Lift
In addition to Matt's list of actor patterns (thank you), the Finite State Machine is a common pattern in actor systems:

Reply all
Reply to author
Forward
0 new messages