On 15 Feb 2017, at 10:16am, Cecil Westerhof <cldwester...@gmail.com> wrote:
> 2017-02-15 8:58 GMT+01:00 Clemens Ladisch <clem...@ladisch.de>: > >> Jens Alfke wrote: >> Threading is the most extreme method of achieving parallelism, and >> therefore should be used only as the last resort. (I'd compare it to >> assembly code in this regard.) > > At the moment I am not using it much and I am certainly not an expert, but > as I understood it one of the reasons to use threading is that it costs a > lot less resources. Compared with processes, yes. Threads share stuff. Processes have their own stuff. Therefore threads are faster to start up and end (no resources to allocate or release) and don’t take any kind of resource space. Two disadvantages are that threads are indistinguishable to anything but the owner and don’t know how to keep out of each-other’s way. By the time you’ve devised some sort of mutex/locking/blocking mechanism you’re usually better-off using processes. Graphics programs where you can assign one thread per pixel because each pixel has its own colour ? Threads. Database programs where everything has to access the same database file ? Processes. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users