Tuesday, 11 December 2018

How to do work asynchronously?

Let's say I want to match a string against a set of regular expressions. If I just iterate over the regexes and try to match each one in turn, that is done synchronously and for large sets of regexes will kill the event loop.I figure I can improve this by doing the regex match asynchronously. Is this even possible? How do I run the code asynchronously?

Submitted December 11, 2018 at 07:44PM by The_Talisman

No comments:

Post a Comment