Skip to content

Commit d618f0b

Browse files
authored
Merge pull request #327 from macvim-dev/revert-326-fix/job_fail
Revert "Use global queue in order to catch read event from channel"
2 parents cf3c928 + 0de29e3 commit d618f0b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/MacVim/gui_macvim.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,19 +2260,13 @@ static int vimModMaskToEventModifierFlags(int mods)
22602260
void *
22612261
gui_macvim_add_channel(channel_T *channel, int part)
22622262
{
2263-
dispatch_queue_t q =
2264-
dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
22652263
dispatch_source_t s =
22662264
dispatch_source_create(DISPATCH_SOURCE_TYPE_READ,
22672265
channel->ch_part[part].ch_fd,
22682266
0,
2269-
q);
2267+
dispatch_get_main_queue());
22702268
dispatch_source_set_event_handler(s, ^{
2271-
dispatch_suspend(s);
2272-
dispatch_async(dispatch_get_main_queue(), ^{
2273-
channel_read(channel, part, "gui_macvim_add_channel");
2274-
dispatch_resume(s);
2275-
});
2269+
channel_read(channel, part, "gui_macvim_add_channel");
22762270
});
22772271
dispatch_resume(s);
22782272
return s;

0 commit comments

Comments
 (0)