We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fa52c64 + c617acf commit cf3c928Copy full SHA for cf3c928
1 file changed
src/MacVim/gui_macvim.m
@@ -2260,13 +2260,19 @@ static int vimModMaskToEventModifierFlags(int mods)
2260
void *
2261
gui_macvim_add_channel(channel_T *channel, int part)
2262
{
2263
+ dispatch_queue_t q =
2264
+ dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
2265
dispatch_source_t s =
2266
dispatch_source_create(DISPATCH_SOURCE_TYPE_READ,
2267
channel->ch_part[part].ch_fd,
2268
0,
- dispatch_get_main_queue());
2269
+ q);
2270
dispatch_source_set_event_handler(s, ^{
- channel_read(channel, part, "gui_macvim_add_channel");
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
+ });
2276
});
2277
dispatch_resume(s);
2278
return s;
0 commit comments