im looking for some method to divide thread in my lightning component JS.

As far as I know is JS running on single thread. but web.Worker function can be alternative.

i tried to use web.worker .. but locker service blocking me. [undefined]

is there any way to divide thread in locker service ??

1 Answer 1


Workers are forbidden by Lightning at this time (Locker API Viewer). There's no indication of when, or if, such functionality might be available. For now, you will have to use a combination of promises and asynchronous callbacks (e.g. setTimeout or events). The specific technique necessary will depend on the goal you're trying to achieve.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .