parallel lazy load

10 views
Skip to first unread message

ced

unread,
Sep 14, 2010, 6:55:35 AM9/14/10
to Lift
I'm using the lazy load snippet posted by DPP (http://
groups.google.com/group/liftweb/msg/be7d80992904774e) and did a slight
modification to it to allow for parallel execution. In
AsyncRenderComet I replaced ActorPing with LAScheduler like this:

override def lowPriority : PartialFunction[Any, Unit] = {
// farm the request off to another thread
case Ready(js) =>
// ActorPing.schedule(() => this ! Render(js()), 0 seconds)
// NEW CODE HERE
LAScheduler.execute(() => this ! Render(js()))

// render it
case Render(js) =>
partialUpdate(js)
}

Is this safe or may I run into issues?

David Pollak

unread,
Sep 14, 2010, 5:41:12 PM9/14/10
to lif...@googlegroups.com
Lift 2.1-RC1 contains a correct implementation of the <lift:LazyLoad/> snippet.  You can see an example at http://demo.liftweb.net/lazy


--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics
Reply all
Reply to author
Forward
0 new messages