[Pas2js] JS Sync/Async Limitations

Michael Van Canneyt michael at freepascal.org
Thu Feb 21 16:07:29 CET 2019



On Thu, 21 Feb 2019, Michael Schnell wrote:

>> http://wiki.freepascal.org/Porting_from_FPC/Delphi_to_pas2js
>>
>
> "There is no multithreading"
>
> Will multithreading never be implemented ?

No. Webworkers more or less replace this, but they work
simply asynchronously.

>
> It seems like providing a GUI in the browser and at the same time communicating with a server could ask for this. 
> Or does the "Many calls are asynchronous and return immediately" feature prevent the need for threads.

It does.

>
> But how do a program that can be run as well in the Browser as natively.

Every call that is asynchronous in the browser can be more or less emulated
using a thread in a native app, to have the same "async" logic.

Michael.


More information about the Pas2js mailing list