Giter VIP home page Giter VIP logo

Comments (1)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Did an initial fix of this problem. The problem arises from the fact that in 
PolyVox we have shared blocks. The current method of generating voxels in 
MapGenerator will cause crash (use debugger and watch stack trace) on SetVoxel 
during interleave thread processing. For example, when we generate Voxel(x - 1) 
we will hit the neighboring shared block, and thus under certain conditions 
this will cause a problem because SetVoxel is not thread-safe. 

We mitigate this by generating borders first and at the same set shared blocked 
size to be smaller than 32 blocks, say, 16 blocks. The lower the shared block 
size the lower the probability of two threads hitting the same shared block in 
an unsafe manner. There is of course still possible there will be issues due to 
interleaved threading nature, but the probability is probably very very small 
when the shared block is lower than 32. May want to set shared block size from 
16 to 8 to be more stable, to be more on the safer side of things. 

To completely eliminate this problem we still have to make this thread-safe. We 
can try using atomic variables when writing borders. But let's just go with the 
current solution for awhile and see how stable it is (it's been pretty stable 
so far).


Original comment by [email protected] on 5 Feb 2011 at 4:00

from projectzombie.

Related Issues (15)

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.