Where possible, prefer structured lifetimes of threads

Cytat:
Where possible, prefer structured lifetimes: ones that are local, nested, bounded, and deterministic. This is true no matter what kind of lifetime we're considering, including object lifetimes, thread or task lifetimes, lock lifetimes, or any other kind. Prefer scoped locking, using RAII lock-owning objects (C++, C# via using) or scoped language features (C# lock, Java synchronized). Prefer scoped tasks, wherever possible, particularly for divide-and-conquer and similar strategies where structuredness is natural. Unstructured lifetimes can be perfectly appropriate, of course, but we should be sure we need them because they always incur at least some cost in each of code complexity, code clarity and maintainability, and run-time performance. Where possible, avoid slippery spaghetti code, which becomes all the worse a nightmare to build and maintain when the lifetime issues are amplified by concurrency.

http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=221601309

Dodaj nową odpowiedź

Zawartość pola nie będzie udostępniana publicznie.
  • Dozwolone znaczniki HTML: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <param> <strike> <caption>
  • Możesz użyć w tekście znaczników BBCode. Adresy zostaną automatycznie zamienione na linki.
  • Możesz włączyć podświetlanie składni poprzez umieszczenie w tekście następujących znaczników: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Tekstowe emotikony zostaną zamienione na ikony.

Więcej informacji na temat formatowania