How pcynlitx produces application specific threading library
Before the library construction process, Pcynlitx collects information about the context of the program from the programmer by means of a descriptor file. From a different perspective, descriptor file can be considered as a contract which is signed between the Pcynlitx and the programmer before the library construction process. In practice, the programmer enters a list of information into the descriptor file by means of the menus of the GUI and Pcynlitx reads that file.
Figure: How Pcynlitx builds application specific thread library
How pcynlitx provides autonomous thread management?
On the home page of this web site, it has been already indicated that the control tools produced by the Pcynlitx have their own memory area. The size of this memory area is determined acording to the requirements of the application on the library construction process. Actually, the programmer enters the requirements of the application to the Pcynlitx before the library construction process. Then, Pcynlitx constructs the class library according to these requirements. In other words, the control tools are constructed for certain number of thread and thread function. By this way, some data structures that hold thread related information can be defined as the members of the classes which manages the threads. Now, let we try to make everything more simple and let we assume that the number of the threads is "2" and the number of the thread function is "2" as well. In this case, a simple class including these information as its data member may be defined as given in below.
The object which is derived from that class may hold information about the numbers of the thread given by the programmer, the numbers of the threads given by the operating system and the name of the thread functions which threads executes. Then this object can mach the numbers given by the programmer to the numbers given by the operating system. After that, this object acts as a brige between the programmer and the operating systems and translate the programmer commands to the operating system. In order to learn how the ID numbers of the threads are recived, you can read the document named as "Technical Introduction". This class is only used for illustration purpose and the real structure of the control classes which are constructed by the Pcynlitx are much more complicated than this class. Furthermore, in Pcynlitx, the memory areas can be dynamically allocated for the thread related datas.
This is also means that the control tools of the Pcynlitx can hold any kind of data. After each operation that is performed on the process, the control tools produced by the Pcynlitx learn what is going on the process and update their knowledge about the situation of the threads automatically. For instance, after the creation of each thread, they receive the most critical information about the process such as which function routine ( thread function ) is executed by which thread. Moreover, the control tools can also receive status of the threads in therms of blocked or non-blocked. Therefore, the programmer can control the threads by means of their both unique numbers and function routines. More specifically, the programmer can determine exactly which thread will be blocked by which thread and how and in which place the threads will be rescued later on. Standard threading libraries don’t have such a control over the threads and Pcynlitx has many other advance properties which the other threading libraries doesn't have (for more, you can look the code examples given on the documents section ).