#Zig Interface and std.atomic.Queue

1 messages · Page 1 of 1 (latest)

willow bluff
#

There is no language level interface concept, you have to craft it yourself with the existing language features. Take a look how allocators are defined or how reader and writer works in the zig std library source

worldly wadi
#

im confused how do I craft it myself?

willow bluff
#

That's why i suggested to look at how it's done in zig std source code

worldly wadi
#

im afriad these just confuse me more, what does crafting entail? How does vtables relate to this all?

willow bluff
worldly wadi
#

ahhh thank you will take a look

worldly wadi
#

btw also for the queue how do I add something to queue?

willow bluff
worldly wadi
#

im confused by the node type, How do I create a Node type to be put in the queue

willow bluff
#

This isn't regular queue, it's a synchronization mechanism. The first link is to regular queue