#No field named error with StringHashmap and Thread

1 messages · Page 1 of 1 (latest)

raw wagon
#

Just downloaded latest zig version to try and fix the issue, but I can't seem to figure out why its not working.

error: no field or member function named 'yield' in 'Thread'
    thread.yield();


error: no field named 'count' in struct 'hash_map.HashMap([]const u8,usize,hash_map.StringContext,80)'
    if (self.connection_id_index_map.count == 0) break :ping;

Any idea why these fields appear in the std docs but are not working in zig 0.11.0-dev.3299+34865d693

hazy jetty
#

count isn't a field, it's a function iirc

#

as for yield, it isn't a method that can be called on an instance of a thread

#

it's only callable for the thread you're currently in

#

it is called as std.Thread.yield()

raw wagon
#

Oh gotcha, yeah you were right lol

#

I was up late coding this and stuck on these for so long, shoulda just gone to bed lol