goby-lang / goby

Goby - Yet another programming language written in Go
MIT License
3.49k stars 171 forks source link

Support Concurrent::Array #482

Closed st0012 closed 6 years ago

st0012 commented 6 years ago

Thanks to @saveriomiroddi, Goby already has thread-safed hash (Concurrent::Hash). But we need to implement thread-safed Array as well.

64kramsystem commented 6 years ago

I'll take care of this as well - there are no alternatives to use a mutex, AFAIK.

I'd use the same approach as the first attempt of ConcurrentHash - a method jump table.

st0012 commented 6 years ago

@saveriomiroddi I think after this issue we should start prepare tests to prove they are really thread-safe. Also need to do some benchmark to compare the performance difference.

This is a brand new field for me actually, but it should be very interesting.

64kramsystem commented 6 years ago

ok. can you give me some pointers to how to perform a method call, from Go, in a test suite?

I have in mind some interesting and effective way to fuzzy test, at least for the ConcurrentHash class.

st0012 commented 6 years ago

@saveriomiroddi I'm doing some refactoring to reduce required info when calling a method, which will make test setup more easier. Once it's done I'll let you know.