{"action":"created","issue":{"url":"https://api.github.com/repos/reactor/reactor-core/issues/63","repository_url":"https://api.github.com/repos/reactor/reactor-core","labels_url":"https://api.github.com/repos/reactor/reactor-core/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/reactor/reactor-core/issues/63/comments","events_url":"https://api.github.com/repos/reactor/reactor-core/issues/63/events","html_url":"https://github.com/reactor/reactor-core/issues/63","id":147453208,"number":63,"title":"Provide a Method for Thread Affinity Within a Subscription","user":{"login":"sskrla","id":4284188,"avatar_url":"https://avatars.githubusercontent.com/u/4284188?v=3","gravatar_id":"","url":"https://api.github.com/users/sskrla","html_url":"https://github.com/sskrla","followers_url":"https://api.github.com/users/sskrla/followers","following_url":"https://api.github.com/users/sskrla/following{/other_user}","gists_url":"https://api.github.com/users/sskrla/gists{/gist_id}","starred_url":"https://api.github.com/users/sskrla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sskrla/subscriptions","organizations_url":"https://api.github.com/users/sskrla/orgs","repos_url":"https://api.github.com/users/sskrla/repos","events_url":"https://api.github.com/users/sskrla/events{/privacy}","received_events_url":"https://api.github.com/users/sskrla/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-11T14:48:00Z","updated_at":"2016-04-17T14:04:53Z","closed_at":null,"body":"Occasionally there will be work that is aggressively single threaded and portions of the consumer chain will need to happen on the same thread. Take for example:\r\n```\r\nFlux.from(request)\r\n    .dispatchOn(sqliteExecutor)\r\n    .map(sqliteWork)\r\n    .dispatchOn(serviceSubmissionExecutor)\r\n    .batch(500)\r\n    .flatMap(submitToService)\r\n    .dispatchOn(sqliteExecutor)\r\n    .doOnNext(recordSubmissions)\r\n    .doOnTerminate(closeDatabase)\r\n    .subscribe()\r\n```\r\nIt would be nice to have a `SchedulerGroup` or some other standard option that assured that work would be done on the same thread when ever a `dispatchOn` was encountered for a given subscription."},"comment":{"url":"https://api.github.com/repos/reactor/reactor-core/issues/comments/211025110","html_url":"https://github.com/reactor/reactor-core/issues/63#issuecomment-211025110","issue_url":"https://api.github.com/repos/reactor/reactor-core/issues/63","id":211025110,"user":{"login":"rstoyanchev","id":401908,"avatar_url":"https://avatars.githubusercontent.com/u/401908?v=3","gravatar_id":"","url":"https://api.github.com/users/rstoyanchev","html_url":"https://github.com/rstoyanchev","followers_url":"https://api.github.com/users/rstoyanchev/followers","following_url":"https://api.github.com/users/rstoyanchev/following{/other_user}","gists_url":"https://api.github.com/users/rstoyanchev/gists{/gist_id}","starred_url":"https://api.github.com/users/rstoyanchev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstoyanchev/subscriptions","organizations_url":"https://api.github.com/users/rstoyanchev/orgs","repos_url":"https://api.github.com/users/rstoyanchev/repos","events_url":"https://api.github.com/users/rstoyanchev/events{/privacy}","received_events_url":"https://api.github.com/users/rstoyanchev/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T14:04:52Z","updated_at":"2016-04-17T14:04:52Z","body":"Which of the patterns is it? "}}