I was thinking of developing a threading unit, and Java/Python like Thread class in FPC. However, before diving into porting that threading code over from Python(as I can read and port Python code easier), I wanted to see if this type of unit has already been made by someone else?
https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.htmlhttps://docs.python.org/2/library/threading.htmlhttps://hg.python.org/cpython/file/2.7/Lib/threading.pyBasically, the unit would expose a "Thread" class, which should normally be subclassed/extended, and the "run()" procedure should be overridded to contain the actual code which will run within the thread. The class would then be created on the Heap, and started using the "start()" procedure.
I have been using Python for a very long time, and I really enjoy how easy it is to create and manage thread classes, and would love to use the same type of technology in FPC/Lazarus applications. If someone else has already ported the Java/Python "Thread" class to FPC/Lazarus, could you please point me to where I could obtain the Unit file? If not, I plan on porting over the Python version over to FPC/Lazarus using it's source code as a model. Python links to the pthreads internally, and from what I have read about FPC's threading, the low-level API of Python threading is very similar to the threading in FPC. So porting it shouldn't be too difficult.