Skip to content

Instantly share code, notes, and snippets.

@kobalski
Created May 24, 2019 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobalski/a4c4dddabf57ab31c8c5f5a98bfca272 to your computer and use it in GitHub Desktop.
Save kobalski/a4c4dddabf57ab31c8c5f5a98bfca272 to your computer and use it in GitHub Desktop.
const thundra = require("@thundra/core")();
exports.handler_blocking = thundra((event, context, callback) => {
setTimeout(function () {
callback(null, {msg: event});
}, 5000);
while (true);
});
exports.handler_non_blocking = thundra((event, context, callback) => {
setTimeout(function () {
callback(null, {msg: event});
}, 5000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment