{"comment":{"created_at":"2011-10-07T19:02:56Z","body":"This was merged into master about a week ago.","updated_at":"2011-10-07T19:02:56Z","url":"https://api.github.com/repos/fabric/fabric/issues/comments/2326126","id":2326126,"user":{"avatar_url":"https://secure.gravatar.com/avatar/f1acc6318028fdba9874c77bc622a2fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/bitprophet","id":6088,"login":"bitprophet"}},"action":"created","issue":{"number":19,"created_at":"2011-08-19T01:57:15Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"### Description\r\n\r\nFabric currently uses the simplest approach to the most common use case, but as a result is quite naive and not threadsafe, and cannot easily be run in parallel even by an outside agent.\r\n\r\nRework the execution model and state sharing to be thread-safe (whether by using threadlocals or something else), and if possible go further and actually implement a parallel execution mode users can choose to activate, with threading or multiprocessing or similar.\r\n\r\n----\r\n\r\nMorgan Goose has been the lead on this feature and has a in-working-shape branch in [his Github fork](https://github.com/goosemo/fabric/commits/multiprocessing) (link goes to the `multiprocessing` branch, which is the one you want to use). We hope to merge this into core Fabric for 1.1.\r\n\r\n----\r\n\r\nCurrent TODO:\r\n\r\n* ~~Anal retentive renaming, e.g. `s/runs_parallel/parallel/`~~\r\n* ~~Code formatting cleanup/rearranging~~\r\n* ~~Mechanics/behavior/implementation double-check~~\r\n* ~~Linewise output added back in (may make sub-ticket)~~\r\n* Paramiko situation examined re: dependency on 1.7.7.1+ and thus PyCrypto 2.1+\r\n    * Including documenting the change in the install docs if necessary\r\n* ~~Pull in anything useful that Morgan hadn't pushed at time of my merge~~\r\n* (if not included in previous) Examine logging support and decide if it's worth bumping to next release\r\n* Test, test, test\r\n\r\n----\r\n\r\nOriginally submitted by **Jeff Forcier** ([bitprophet](https://github.com/bitprophet)) on **2009-07-21** at **02:52pm EDT**\r\n\r\n### Attachments\r\n\r\n* [multiprocessing.patch](https://gist.github.com/198cbc3d7b7b8d9a37d3)\r\n\r\n### Relations\r\n\r\n* Related to #20: Rework output mechanisms\r\n* Related to #21: Make execution model more robust/flexible\r\n* Related to #197: Handle running without any controlling tty\r\n","comments":48,"title":"Implement parallelism/thread-safety","updated_at":"2011-10-07T19:02:56Z","url":"https://api.github.com/repos/fabric/fabric/issues/19","id":1437712,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/f1acc6318028fdba9874c77bc622a2fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/bitprophet","id":6088,"login":"bitprophet"},"milestone":null,"closed_at":"2011-10-07T19:02:56Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/f1acc6318028fdba9874c77bc622a2fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/bitprophet","id":6088,"login":"bitprophet"},"html_url":"https://github.com/fabric/fabric/issues/19","labels":[{"name":"1.x","url":"https://api.github.com/repos/fabric/fabric/labels/1.x","color":"DDDDDD"},{"name":"Core","url":"https://api.github.com/repos/fabric/fabric/labels/Core","color":"ededed"},{"name":"Feature","url":"https://api.github.com/repos/fabric/fabric/labels/Feature","color":"40a056"},{"name":"Wart","url":"https://api.github.com/repos/fabric/fabric/labels/Wart","color":"e10c02"}],"state":"closed"},"legacy":{"issue_id":1437712,"comment_id":2326126}}