{"id":5237,"date":"2011-06-29T10:03:03","date_gmt":"2011-06-29T15:03:03","guid":{"rendered":"http:\/\/bobbeaty.com\/wp\/?p=5237"},"modified":"2011-06-30T07:19:10","modified_gmt":"2011-06-30T12:19:10","slug":"choosing-the-simplest-tools-for-the-job","status":"publish","type":"post","link":"https:\/\/bobbeaty.com\/wp\/archives\/5237","title":{"rendered":"Choosing the Simplest Tools for the Job"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/bobbeaty.com\/wp\/wp-content\/uploads\/2007\/09\/bug.gif\" alt=\"bug.gif\" title=\"bug.gif\" border=\"0\" width=\"128\" height=\"115\" style=\"float:right; margin-left:10px;\" \/><\/p>\n<p>This morning I ran into a nasty little seg fault on my Greek Engine and it <em>appeared<\/em> to be related to the multiple-producer\/single-consumer ring FIFO where it <em>appeared<\/em> to have gotten a \"dead space\" in the FIFO, and with that, the head could not advance and so the queue filled and blew up. Again, I say it <em>appears<\/em> this happened, but I can't be 100% certain. It happened on several boxes, so I'm not ruling out bad input data, as that would be a far more <em>likely<\/em> issue, but other (slower) boxes didn't have this issue, so it's hard to pin this down.<\/p>\n<p>What I can say is that there's always more than one way to skin a cat, and in truth, the particular queue I was using was <em>overkill<\/em> for the task at hand. As point of fact, the code only needs a single-producer\/single-consumer queue and that's <strong><em>far simpler<\/em><\/strong> than the multiple-producer\/single-consumer queue. So, taking a cue from my own advice about design, <em>simplifying<\/em> the code was the right thing to do. So I simply swapped out the one for the other and away we go.<\/p>\n<p>Good advice - use what's <strong>needed<\/strong>, not just what's cool or flashy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This morning I ran into a nasty little seg fault on my Greek Engine and it appeared to be related to the multiple-producer\/single-consumer ring FIFO where it appeared to have gotten a &#8220;dead space&#8221; in the FIFO, and with that, the head could not advance and so the queue filled and blew up. Again, I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-5237","post","type-post","status-publish","format-standard","hentry","category-coding","category-cube-life"],"_links":{"self":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts\/5237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/comments?post=5237"}],"version-history":[{"count":1,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts\/5237\/revisions"}],"predecessor-version":[{"id":5238,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/posts\/5237\/revisions\/5238"}],"wp:attachment":[{"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/media?parent=5237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/categories?post=5237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bobbeaty.com\/wp\/wp-json\/wp\/v2\/tags?post=5237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}