HaxeFoundation / haxe.org-comments

Repository to collect comments of our haxe.org websites
2 stars 2 forks source link

[haxe.org/manual] Threading #70

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

Threading - Haxe - The Cross-platform Toolkit

Haxe is an open source toolkit based on a modern, high level, strictly typed programming language.

https://haxe.org/manual/std-threading.html

daverave1212 commented 4 years ago

What is that syntax at sys.thread.Thread.create?

() -> {}

Looks like a Lambda, but it is not accepted by try.haxe.org as correct syntax.

Aurel300 commented 4 years ago

@daverave1212 It is indeed an arrow function. Unfortunately, try.haxe.org is a bit outdated. Arrow functions are a Haxe 4 feature.

daverave1212 commented 4 years ago

@Aurel3000 Thanks, I didn't know Haxe supports arrow functions!

neimanpinchas commented 1 year ago

What's about synchronozation methods? for example I need to pause a thread until some data becomes avalible.

neimanpinchas commented 1 year ago

I will answer my own question, the is sys,thread.Lock and sys,thread,Semaphore