<div dir="ltr"><div class="gmail_extra"><div class="im" style="font-family:arial,sans-serif;font-size:13px"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="auto">When would the list be invalidated? If the list can turn wrong without anyone being made aware of it, and your only hope is to fetch the data again, or risk failure, then no level of caching makes sense.</div>
</blockquote><div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">My reason to add that "cache" was not really to cache the data, but to be able to iterate through the list of threads without having a SBThreadList object. We don't really have a way of knowing when the data changed, but the don't change when the program is stopped and they can change everytime the program is allowed to run.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Btw. does SBValue do any caching? Does it get invalidated when the program is allowed to run?</div>
<div class="im" style="font-family:arial,sans-serif;font-size:13px"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="auto">That's not a bad idea. Just like SBValue has a ValueImpl, SBThreadList would have an Impl object. The Impl would contain a set of ThreadSP/SBThread objects and return those when asked.</div></blockquote>
<div><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">That sounds reasonable and would solve this, if we're fine with SBThreadList not being the SB equivalent of ThreadList. I could then expose the API from anywhere, let's say as</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">  SBThreadList SBProcess::GetMemoryHistoryThreadsForAddress(addr_t addr);</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">which might make more sense than from SBValue. Would you prefer that?</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
Kuba</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></div></div>