title: Single- vs. multi-threaded programming on a single core processor
body: <p>Can someone please explain if there's really any advantage to writing a multi-threaded piece of code that runs on a single processor with a single core?  E.g., a method that processes document pages such that the pages are mutually exclusive w/r/t the aforementioned piece of code.</p>
  
  <p>At first glance, it doesn't seem like there'd be an advantage because true multi-threading is not possible.  I.e., the OS would have to context switch the threads anyway.  I'm wondering if just coding something in a single-threaded manner could actually be more efficient.</p>
  
  <p>Clearly, there are plenty of cases where writing multi-threaded code makes sense, but again, my question gets to whether there's really an advantage of doing so when the application is running on a single-core processor.</p>
  
  <p><strong>EDIT:  note, that I did not say "application" but rather "piece of code"</strong> - look at my example above.  Clearly there are benefits to having a multi-threaded application.</p>