Code Monkey home page Code Monkey logo

Comments (14)

StormHub avatar StormHub commented on June 17, 2024 2

There are a few places need to be guarded properly. Let me change it first.

from netuv.

Norgerman avatar Norgerman commented on June 17, 2024

pr #46

from netuv.

StormHub avatar StormHub commented on June 17, 2024

Hi, do you have full stack trace for this?

from netuv.

StormHub avatar StormHub commented on June 17, 2024

I believe it might be a better option to just do the schedule, then wait for the loop to start and process.
e.g. wait for the loop in a run state where it is guaranteed not to be null.

from netuv.

StormHub avatar StormHub commented on June 17, 2024

Let me change it a bit and let you to have a look at it.

from netuv.

Norgerman avatar Norgerman commented on June 17, 2024

the error's stack trace,just use the loopthread example

Loop thread error System.NullReferenceException: Object reference not set to an instance of an object.
   at NetUV.Core.Channels.EventLoop.Schedule(Action`1 action) in C:\Users\XXX\Desktop\NetUV\src\NetUV.Core\Channels\EventLoop.cs:line 94
   at LoopThread.Program.Main(String[] args) in C:\Users\XXX\Desktop\NetUV\examples\LoopThread\Program.cs:line 31.

line 94:

this.asyncHandle.Send();

from netuv.

StormHub avatar StormHub commented on June 17, 2024

I see, thanks.

from netuv.

StormHub avatar StormHub commented on June 17, 2024

Well, the intention is that
await RunLoopAsync();
then call
eventLoop.Schedule

I will fix the example.

from netuv.

Norgerman avatar Norgerman commented on June 17, 2024

The code shows that await RunLoopAsync(); will block util the loop is closed,so eventLoop.Schedule will not be called properly....

from netuv.

StormHub avatar StormHub commented on June 17, 2024

The EventLoop class is kind of experimental, forget to put some attribute on it.

from netuv.

Norgerman avatar Norgerman commented on June 17, 2024

😄

from netuv.

StormHub avatar StormHub commented on June 17, 2024

#48, try it out.

from netuv.

Norgerman avatar Norgerman commented on June 17, 2024

works~ 👍

from netuv.

StormHub avatar StormHub commented on June 17, 2024

PR #48

from netuv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.