Giter Site home page Giter Site logo

Comments (4)

mkjeff avatar mkjeff commented on July 20, 2024 1

Seems dotnet codefx team use a trick doing this.

    [StructLayout(LayoutKind.Sequential)]
    internal sealed class Pinnable<T>
    {
        public T Data;
    }

https://github.com/dotnet/corefx/blob/757de9ef5e3964c8ca56d088854230feb2da23a5/src/System.Memory/src/System/ReadOnlySpan.cs#L93

I do not know exactly how it works.

from secs4net.

SEPTEMBER998767 avatar SEPTEMBER998767 commented on July 20, 2024

Hi, any max device support limit? I still not sure for how it will work with multi threading environment. I would suggest for more detail document and example for multi device/thread. Thank you.

sorry I am quite not familiar with git if i post wrongly here, code plex user here 🍡 ,
can't find correct discussion tab.

Oh, the project is evolving so much, I was checking the old one from code plex. gotta browse through.

from secs4net.

mkjeff avatar mkjeff commented on July 20, 2024

Yeah, code changes a lot.
At present, all of the change were POC merely. It's just fun for me.

In fact, I'm not in the industry a while. I hope somebody can contribute this project or even take over and made it works in real world.

Back to topic,
I think this why C# 7.0 need to provide ref return feature. It's the key role for open up performance gain and keep language still safe.

Code for fun :)

from secs4net.

mkjeff avatar mkjeff commented on July 20, 2024

Seems this is an answer: Span has undefined behavior off the stack

from secs4net.

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.