Web Workers and timers

7 views
Skip to first unread message

MindstormsKid

unread,
Dec 18, 2009, 12:41:48 AM12/18/09
to JSDB
Hi, I was wondering if (and when) JSDB will support Web Workers
(http://enwp.org/Web_worker)? And is there any timer support
(setTimeout, setInterval..)? I didn't see any in the docs.

Shanti Rao

unread,
Dec 19, 2009, 9:00:32 PM12/19/09
to JSDB
Dear MindstormsKid,

The setTimeout() and setInterval() functions are for web browsers,
whereas JSDB is a procedural programming language. If you want to run
code periodically, you can use system.sleep() function to delay.

var running = true
while (running)
{
doSomething()
system.sleep(1000)
}

For Web Workers, start by looking at the grid programming toolkit,
with which you could extended (add message tracking) implement Web
Workers, which set up to run like cofunctions, whereas the JSDB grid
was set up to do fault-tolerant parallel computing. http://www.jsdb.org/grid.zip

Shanti

On Dec 17, 9:41 pm, MindstormsKid <mindstorm...@gmail.com> wrote:
> Hi, I was wondering if (and when) JSDB will support Web Workers

> (http://enwp.org/Web_worker)?And is there any timer support

Reply all
Reply to author
Forward
0 new messages