{"id":38,"date":"2004-01-15T10:55:39","date_gmt":"2004-01-15T10:55:39","guid":{"rendered":"http:\/\/localhost:8000\/?p=38"},"modified":"2004-01-15T10:55:39","modified_gmt":"2004-01-15T10:55:39","slug":"threading-patterns","status":"publish","type":"post","link":"https:\/\/blog.gwadej.org\/programmer-musings\/2004\/01\/threading-patterns\/","title":{"rendered":"Threading Patterns"},"content":{"rendered":"<p>Possibility of thinking of multi-threading design patterns as a way to organize threading code.<\/p>\n<p>Some possible patterns include:<\/p>\n<ul>\n<li>Fire and Forget (background thread)<\/li>\n<li>Periodic (Timer)<\/li>\n<li>IO thread<\/li>\n<li>Producer\/Consumer<\/li>\n<li>Worker thread (work queue)<\/li>\n<li>Copier thread<\/li>\n<li>Pipeline (must be careful)<\/li>\n<li>Swarm?<\/li>\n<\/ul>\n<p>The background thread could be joined at a later time or a thread that runs it&#8217;s course and dies.<\/p>\n<p>We need a good term for the latter. Java calls them <em>daemon threads<\/em>. I don&#8217;t think the term conjures the right connotations.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Possibility of thinking of multi-threading design patterns as a way to organize threading code. Some possible patterns include: Fire and Forget (background thread) Periodic (Timer) IO thread Producer\/Consumer Worker thread (work queue) Copier thread Pipeline (must be careful) Swarm? The background thread could be joined at a later time or a thread that runs it&#8217;s\u2026 <span class=\"read-more\"><a href=\"https:\/\/blog.gwadej.org\/programmer-musings\/2004\/01\/threading-patterns\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[218],"_links":{"self":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts\/38"}],"collection":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}