jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Boo
  • Boo
  • BOO-806

volatile fields

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.9
  • Fix Version/s: 0.9.1
  • Component/s: Compiler, Emitter
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    0

Description

New [volatile] AST attribute that adds required custom modifier System.Runtime.CompilerServices.IsVolatile on a field.
Subsequent accesses (load or store) to such fields have IL "volatile." prefix.
Fields that are declared volatile are not subject to compiler optimizations that assume access by a single thread.
This ensures that the most up-to-date value is present in the field at all times.
Read http://msdn.microsoft.com/en-us/library/x13ttww7.aspx for more information.

Usage:

class Test:
    [volatile]
    public static Value = 42

print Test.Value

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Cedric Vivier added a comment - 06/Mar/09 11:11 AM

Landed in rev. 3279

Show
Cedric Vivier added a comment - 06/Mar/09 11:11 AM Landed in rev. 3279

People

  • Assignee:
    Cedric Vivier
    Reporter:
    Rodrigo B. de Oliveira
Vote (0)
Watch (0)

Dates

  • Created:
    26/Feb/07 3:07 PM
    Updated:
    06/Mar/09 11:11 AM
    Resolved:
    06/Mar/09 11:11 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.