Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
parallelised functions and normal non concurrent functions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sp2012  
View profile  
 More options Jul 25 2012, 3:35 am
From: sp2012 <s.papageorg...@mail.com>
Date: Wed, 25 Jul 2012 00:35:26 -0700 (PDT)
Local: Wed, Jul 25 2012 3:35 am
Subject: parallelised functions and normal non concurrent functions

I parallelise some functions with spawn and hold(Math.random * 20). What
happens if a pure normal js function scheduled with setTimeout finds the
opportunity to run, while the parallelised functions still run? The pure
function won't run concurrently, right? I am asking because in a game that
I build some function with setTimeout runs and then ends before it
completes, while it would have to complete (probably a bug in my game).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexander Fritze  
View profile  
 More options Jul 26 2012, 1:50 am
From: Alexander Fritze <a...@onilabs.com>
Date: Thu, 26 Jul 2012 07:50:58 +0200
Local: Thurs, Jul 26 2012 1:50 am
Subject: Re: [oni-apollo] parallelised functions and normal non concurrent functions

On Wed, Jul 25, 2012 at 9:35 AM, sp2012 <s.papageorg...@mail.com> wrote:
> I parallelise some functions with spawn and hold(Math.random * 20). What
> happens if a pure normal js function scheduled with setTimeout finds the
> opportunity to run, while the parallelised functions still run? The pure
> function won't run concurrently, right? I am asking because in a game that I
> build some function with setTimeout runs and then ends before it completes,
> while it would have to complete (probably a bug in my game).

It depends on the details. Let's say the functions that you spawn have the form:

function foo() {
  hold(Math.random*20);
  ...more code, but no hold(), etc...

}

Your pure JS function might execute while foo is blocking in the
hold()-call, or after foo() is finished, but not while 'more code' is
executing (unless 'more code' contains blocking calls as well, such as
hold(), or calls to functions that, in turn, call hold()).

Cheers,
Alex


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »