Find Jobs
Hire Freelancers

whats the best approach?

$10-30 USD

Chiuso
Pubblicato quasi 6 anni fa

$10-30 USD

Pagato al completamento
lets say I have 50 threads waiting one value. the one value is generated by the 51st thread at a random time. So the value is global and shared accross all threads. whats the best approach for the 50 threads to keep checking for the value? My goal is they all get the value at the same time as soon as thread 51 generates it. do you suggest a while loop? but that could clog the program becasue 50 while loops with no sleeps are a lot. Do you suggest locks? what do you suggest? my program is in node and Im using async functions.
Rif. progetto: 16733546

Info sul progetto

3 proposte
Progetto a distanza
Attivo 6 anni fa

Hai voglia di guadagnare un po'?

I vantaggi delle offerte su Freelancer

Imposta il tuo budget e le scadenze
Fatti pagare per il lavoro svolto
Delinea la tua proposta
La registrazione e le offerte sui lavori sono gratuite
3 freelance hanno fatto un'offerta media di $28 USD
Avatar dell'utente
Hi, Looks like you need some Event triggered to 50 processes when the value is generated. I agree running while cycles is a bad Idea. Let's have a quick chat for further details. Thanks!
$30 USD in 1 giorno
5,0 (14 valutazioni)
4,4
4,4

Info sul cliente

Bandiera: UNITED STATES
champaign, United States
5,0
10
Metodo di pagamento verificato
Membro dal ago 13, 2017

Verifica del cliente

Grazie! Ti abbiamo inviato tramite email il link per richiedere il tuo bonus gratuito.
Non è stato possibile inviarti l'email. Riprova per piacere.
di utenti registrati di lavori pubblicati
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Caricamento anteprima
Autorizzazione per la geolocalizzazione concessa.
La tua sessione è scaduta ed è stato effettuato il log out. Accedi nuovamente per piacere.