English 中文(简体)
调度业务
原标题:DispatcherOperations.Wait()

请打电话 发送业务.Wait(),介绍已经完成的作业情况? 另外,该书还称,它交还了<代码>DisplerOperationStatus,但总有Completed,因为它(假定)在进行之前就没有返回?

我试图这样做:

    private void Update()
    {
        while (ops.Count > 0) ops.Dequeue().Wait();
    }

    public void Add(T item)
    {
        lock (sync)
        {
            if (dispatcher.CheckAccess())
            {

                list.Add(item);
                OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item));

            }
            else
            {
                ops.Enqueue(dispatcher.BeginInvoke(new Action<T>(Add), item));
            }
        }
    }

在计生联中使用这一条,因此所有<代码> 添加的操作必须放在自动识别码的线索上,但我看上去,基本上不能等到转换线上,然后在任何阅读操作之前只打上Update(<>,以确保清单更新,但我的节目开始hang。

问题回答

i 认为我知道为什么 it死。

页: 1 调度业务 有人警告说,要等到同一处,行动也已经派遣。 因此,可能发生的情况是,有一个行动有待行动组处理,但当时,你呼吁瓦伊特从德国马克特开展这一行动,因为等待会阻碍行动,因此你刚刚陷入僵局。

如果你绝对相信没有发生任何未决事件,那么你可以做些什么,就是看看问题中的作业情况,你就可以去除任何已完成的工作,如果没有完成的工作,你将不得不在晚些时候再次尝试。

诚然,你可能最好不要担心,而是处理收发通知,这样,当有新内容时,你就会得到确切的信息,而且你不得不对有待采取的行动感到担忧。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签