This Lazarus package "threads" is supposed to be used in other packages, which need threading, for instance to watch the environment of a program, while the main thread has to do other things, and to send messages to objects of the main thread. What happens in detail depends on implementing the provided interface.
The source code is a sketch of the idea in Object Pascal. It will be continued, if it will be tested and debugged successfully in examples.