changes api

66 views
Skip to first unread message

TJIMH

unread,
Jul 22, 2014, 11:11:48 AM7/22/14
to rav...@googlegroups.com
Is there any issue with the OnNext method being an async method for a changes api subscription?

Oren Eini (Ayende Rahien)

unread,
Jul 22, 2014, 1:07:46 PM7/22/14
to ravendb
I don't understand the question.



Oren Eini

CEO


Mobile: + 972-52-548-6969

Office:  + 972-4-622-7811

Fax:      + 972-153-4622-7811





On Tue, Jul 22, 2014 at 6:11 PM, TJIMH <bobbl...@gmail.com> wrote:
Is there any issue with the OnNext method being an async method for a changes api subscription?

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TJIMH

unread,
Jul 23, 2014, 8:47:30 AM7/23/14
to rav...@googlegroups.com
in other words ...

is this a valid signature for the OnNext method:

public async Task OnNext(DocumentChangeNotification documentChangeNotification)
        {...}

Oren Eini (Ayende Rahien)

unread,
Jul 24, 2014, 3:16:21 AM7/24/14
to ravendb
Where are you trying to use this method?
OnNext is a method on IObservable, which is a system interfce.

TJIMH

unread,
Jul 24, 2014, 10:40:12 AM7/24/14
to rav...@googlegroups.com
Using it on a class that implements IObserver<DocumentChangeNotification>

the OnNext method needs to await an async method during its processing, thus the need to have the async void OnNext method signature.

This compiles fine, I am just curious as to what might be the effect of that if anything.

Oren Eini (Ayende Rahien)

unread,
Jul 24, 2014, 10:47:19 AM7/24/14
to ravendb
I don't know, that is a CLR issue, not a RavenDB one.
Reply all
Reply to author
Forward
0 new messages