Jump to content
McKay Development

I need to handle some concurrency ?


Recommended Posts

I know NodeJs works in a single thread , but the modules work with request that use sessions , then i have the doubt .

 

I need to handle only one offer per account at a time ? Or can I make all the calls to .createOffer I need ?

 

I tested calling the method many times and works, but is it "secure" ?

 

Link to comment
Share on other sites

The createOffer method doesn't do anything on the network. It just creates a new object in memory, which you can add items to and set properties on. Nothing of value actually happens until you call offer.send().

 

So that means you can call createOffer as many times as you want. You could call it a million times in a second if you wanted and nothing would break. Of course, sending offers that frequently isn't gonna work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...