λshμηarie
λshμηarie
CC#
Created by sepp on 9/6/2023 in #help
❔ Newbie question- dotNET Core API with layered architecture with AngularJS as Frontend
There's a few things going on here. Architecture aside, for now lets tackle file storage. You are allowing users to upload files, but you're not sure where to store them? The answer to this depends on what your infrastructure and hosting environment is like, as well as the expectations you set for your users. Are they able to download files they upload? Are files discarded after X number of minutes? Are you behind a load balancer in a highly available hosting environment? If you're just running on a virtual machine, with zero horizontal scaling, you could save the files just about anywhere that makes sense to you... I'm not sure if theres a golden rule about this... It really depends on your use case and environment.
3 replies
CC#
Created by Heroshrine on 9/5/2023 in #help
✅ Does supplying a task with a delegate / action run that action on the main thread?
Tasks != Threads, multiple tasks may share the same thread based on the task scheduler configuration. Typically it is recommended to use tasks, allowing the task scheduler to delegate work to worker threads. If you absolutely must have thread isolation, you can use Thread instead of Task.
information that this is the correct way to retrieve information from a thread
What thread information are you trying to retrieve? Can you elaborate on your use case?
19 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
I'll try to set these to the correct types on the C# side and report back.
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
But didn't you say it needed to be nint for alignment?
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
Why not?
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
So what C# types should I use for uint32_t and size_t then?
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
Why does number 1 through 6 work in that case?
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
I've tried using different variable types, long, uint, nuint, etc... the result is the same. Additionally if the variable types were the cause I would expect the same incorrect values to be present on x64 intel linux correct? It works fine on x64 linux...
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
size_t afaik doesn't directly map to long as size_t depends on the architecture, correct?
26 replies
CC#
Created by λshμηarie on 9/4/2023 in #help
C#/C Interop M1 Padding/Alignment Issues
I've tried to play around with nuint and uint but they had the same issue iirc.
26 replies