Where is sun.misc.Unsafe documented? [closed] - unsafe

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Does anyone know of any comprehensive documentation for sun.misc.Unsafe?
I'm looking for documentation on Unsafe.putOrderedInt(). This was all I was able to find.
public native void putOrderedInt(Object o,
long offset,
int x)
Ordered/Lazy version of #putIntVolatile(Object, long, int)
Does anyone know of a better source?

There is a nice post about it on mishadoff's blog here.
The class is officially undocumented though.

Regarding the putOrdered methods..
You can call this method to set the volatile field without using a volatile store.. If you execute a volatile store, you basically have a store memory barrier which ensures that all store instruction prior the barrier, happen before barrier and that memory is visible by ensuring the data is propagated to the cache sub-system.. So when you have the volatile store you must wait for the store buffer to drain.. With putOrdered thread executing will not wait for the store buffer to drain and this can improve performance.. However as a consequence stored value will not be visible to other threads immediately..
If you have a look on AtomicLong (or other Atomic classes) there is a lazySet method that actually executes putOrderedLong. The javadoc on this method is:
Eventually sets to the given value.

Related

Where to find reference for PyGObject [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm working on a Python based source code editor. I've created a clean layout with a Gtk.Notebook. Creating a main layout was easy with Glade, but right after I imported gi.repository, everything got hard. It's very hard to find documentation. From pydoc I can 't get anything, only method signatures, which are usually *args, **kwargs. I often need to check what a method returns or takes in, and I haven't really started signals and other stuff yet.
Is there a complete/almost-complete documentation, especially for GtkSource? GtkSource is especially undocumented.
You should probably read my answer to a similar SO question: PyGObject GTK+ 3 Documentation. In short, you should refer to the GtkSourceView API Reference for C. Don't worry, it's not hard. When you see "GtkSourceView" in the C docs you know it's "GtkSource.View" in Python. When you see "gtk_source_view_new" in C docs you know it's the constructor in Python "GtkSouce.View()". You can set any GTK+ property in the constructor and there is usually get_foo/set_foo style methods for each property.
Therefore, you can do things like:
view = GtkSouce.View(indent_width=4, show_line_numbers=True)
view.get_buffer().set_text("Hello World!")
Remember, GTK+ widgets are objects so you need to pay attention to the hierarchy to find all the methods and properties for a widget.

Function overloads, documentation almost identical [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have two acquire functions and, besides their arguments, the documentation is identical. How should I handle this? Should I add something like "The same general notes found in function X's documentation also apply here"? If not, does Doxygen offer some kind of tool for dealing with cases like this?
ResourcePtr<T> acquire(const std::string& file);
ResourcePtr<T> acquire(const void* buffer, std::size_t size);
I don't know Doxygen, so this answer is purely on my documentation approach.
When I document in a situation like where two topics are nearly identical, I either repeat the shared information in both (preferred) or I write something similar to the following:
"Function Y is similar to function X. Function Y takes the arguments abc and [put how it works differently here]...
For more information on these functions, see ."
In this case I'd document the simpler one and add the additional info to the more complex one.
A third way is to break out the common doc from both, if that's possible.
From This Page:
Use the \sa (See Also) keyword to link to related variables, methods, or classes. This is the equivalent command to \see tag.

Does autotrader.com (vehicle marketplace) offer an API for posting vehicles? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Does anybody know if autotrader.com offers an API or something that would help with mass postings of vehicles?
Or does anybody have any idea of what to use to create something like this? I was thinking of maybe a mouse location and click over a browser window type of thing.
AutoTrader provides a bulk upload feature through a file feed process. The file runs through a set of processes to associate it with the proper listing tier (Premium, Feature or Standard) and in addition normalizes the information across vehicle make and models. This process runs several times daily and is being migrated to a near real-time solution for quicker add or updates.
I can find no documentation on it but I've come across this link which seems to provide a json response.
https://www.autotrader.com/rest/searchresults/sunset/base

Alternatives to Protocol Buffers [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I'd like a basic message passing/RPC system. I could use a serialisation system but I want some sort of verification to ensure both ends are synchronised. I've looked at Google Protocol Buffers, but I'm not too keen on code generation. What are other alternatives?
You can look at http://msgpack.org/
Maybe thrift would do.
http://thrift.apache.org/
Cap'n Proto, which is designed by Kenton Varda, who worked for Google as the primary author of Protocol Buffers version 2 (the open source one now everybody uses). It has a feature called "time travel" that worths looking (a feature that makes round trips for fetching dependent data to and from server into one trip).
http://kentonv.github.io/capnproto/
I really love Cap’n Proto!
Awesome serialization + RPC capabilities, open source, great schema language...
(Authored by Kenton Varda, the primary author of Protocol Buffers version 2)

Detailed Valgrind internals documentation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm thinking of making a D interface to Valgrind's client request API. By mucking around in the header files and de-compiling stuff, I could eventually figure out what it's doing but I'm wondering if their is a authoritative document on how things work? (BTW I already found this document but it doesn't have enough info)
What I'm looking for would answer questions like: How do I generate the macros to wrap/call a function that returns a 32bit machine word and takes a 64bit float?
In the valgrand manual, it describes the existing client request prototypes at the bottom of http://valgrind.org/docs/manual/manual-core-adv.html but none of these support passing 64bit floats. You could split it into two longs and pass it that way. It does look pretty hairy.
The authoritative document on how it works is the source code. If the tech docs are incomplete, then use the source.
I would also suggest looking at the sources of libraries that use the client request mechanism.