stm

  • Intimating new firmware start address to bootloader 2018-08-08

    Considering a microcontroller(in my case STM32L4 series) once the new firmware image is written into the flash, how the new start address of the application can be intimated to the bootloader? --------------Solutions------------- Normally the bootloa

    Tags: boot, bootloader, stm32, stm
  • STM.NET versus Clojure STM 2013-06-24

    I'm wondering how is that possible that Clojure has implemented Software Transactional Memory and doesn't see any problem with that while Microsoft didn't finish its work for C# and noticed some problems which make it unpractical to implement STM des

    Tags: .net, clojure, stm
  • Haskell: TVar: orElse 2012-04-11

    Is the "else" part of orElse called when a transaction is retried due to another transaction writing to a TVar it had read, or only when retry is explicitly called? --------------Solutions------------- If you have orElse a b then b is only run if ret

    Tags: concurrency, haskell, ghc, stm, tvar
  • Clojure STM Out of Memory 2012-04-04

    I have a small program that should perform parallel banking transfer using the STM, so I am testing it on different machines, 2-core and a 1-core. In the 2-core machines everything works, but in the 1-core machine, the Java Out of Memory error is thr

    Tags: memory, heap, multicore, clojure, stm
  • TimeoutManager uses tryPutMVar to put nothing 2012-03-26

    In Snap source Snap.Internal.Http.Server.TimeoutManager ------------------------------------------------------------------------------ -- | Register a new connection with the TimeoutManager. register :: IO () -- ^ action to run when the timeout deadl

    Tags: haskell, snap framework, stm
  • Software transactional memory with a big, shared piece of data 2012-03-03

    The original question I'm new to STM. One thing I'd like to do in Haskell involves a big piece of data, and lots of lightweight threads reading and writing to small parts of said big piece of data. The locations read from and written to can be consid

    Tags: haskell, stm
  • Large Data Structure in Clojure STM for Banking Transactions LOOP 2012-03-03

    I am new to Functional Programming and Clojure, so I am not really sure about what to do for a project at University. The project should show the advantage of Clojure STM for banking transactions (Transfer of money from account A to account B). So I

    Tags: clojure, stm
  • How safe is `unsafePerformIO (newTVarIO 0)`? 2011-12-25

    I've noticed this idiom in Data.Unique: uniqSource :: TVar Integer uniqSource = unsafePerformIO (newTVarIO 0) {-# NOINLINE uniqSource #-} Is it guaranteed to only run once? --------------Solutions------------- In GHC, yes.1 See the documentation for

    Tags: haskell, stm
  • TransactionalMap vs SynchronizedMap 2011-12-13

    When should one prefer Akka TransactionalMap over regular immutable map mixed in with SynchronizedMap and vice versa? (Or am I comparing apples to oranges here?) --------------Solutions------------- Use the transactional map when you want to have tra

    Tags: concurrency, synchronization, scala, stm, akka
  • Readers-writers using STM in Clojure 2011-11-22

    There is the following version of readers-writers problem: multiple readers and writers, 2 or more readers can read simultaneously, if a writer is writing no one can read or write, it is preferred if all writers get an equal chance to write (for exam

    Tags: clojure, stm
  • Using STM and Database transactions together 2011-11-19

    I have been using Haskell's STM library and I really like the ability to compose transactions and the general "you-can't-get-this-wrong" nature of STM. For good reason, STM does not allow IO actions within a transaction. There is no way to retry an I

    Tags: database, haskell, stm
  • Proguard crashes on Scala code depending on Multiverse STM 2011-11-09

    I'm trying to optimize some Scala code which relies on the Multiverse STM (0.6.2) with Proguard. I'm using the STM in conjunction with akka. As I try to do so, I get the following error: Unexpected error while inlining subroutines: Class = [org/multi

    Tags: java, crash, scala, proguard, stm
  • Haskell: thread blocked indefinitely in an STM transaction 2011-10-22

    Is there any way to increase a time interval, on the basis of which the RTS decides that thread has blocked indefinitely in an STM transaction? Here is my code: import Control.Concurrent (ThreadId) import Control.Concurrent.MVar (MVar,newMVar,withMVa

    Tags: multithreading, haskell, stm
  • Disable Logging for Akka STM (Multiverse) 2011-10-20

    I am using akka stm and when my application starts it prints out (to the stderr): Okt 20, 2011 10:17:10 AM org.multiverse.api.GlobalStmInstance <clinit> Information: Initializing GlobalStmInstance using factoryMethod 'org.multiverse.stms.alpha.

    Tags: logging, scala, stm, akka
  • Using the Par monad with STM and Deterministic IO 2011-10-14

    I'm in the process of writing a report for an assignment in which I implemented a concurrent multicore branch and bound algorithm using the STM package and there was an issue I've come up against. The implementation which uses STM is obviously in the

    Tags: concurrency, haskell, monads, parallel processing, stm
  • Akka, Thread Dispatchers, Agents Best Practice 2011-10-10

    I've dabbled in Scala for a while, and have studied Akka from afar, and am finally plunging in. The FSM trait sealed the deal for me. What concerns me is that I may have conceived of how data would be shared inappropriately, and I may have conceived

    Tags: fsm, stm, akka
  • Testing STM functions purely 2011-10-01

    I've recently started using STM for some bits in a project of mine, but I'm having trouble figuring out how to test it. I have no IO in these functions and was hoping I could write QuickCheck properties to test things, but "atomically" (STM a -> I

    Tags: unit testing, haskell, stm
  • Why does Scala fail to instantiate a Companion Object? 2011-08-31

    I am new to Scala and Akka so forgive me if this is a newb question, but I can't find the answer anywhere else... For the record I am using Scala 2.9.0-1 and Akka 1.1.3 and have included my SBT 0.10.1 setup as well. I have written the code that follo

    Tags: scala, stm, akka
  • Difference between TVar and TMVar 2011-08-02

    I've seen the TVar is a simple container, while the TMVar is the same as an MVar, meaning it has a lock etc, but within the STM monad. I am wondering why would that be necessary, as the idea of the STM is to make locks unnecessary. So which is the on

    Tags: concurrency, haskell, stm
  • scala/akka/stm design for large shared state? 2011-08-02

    I am new to Scala and Akka and am considering using it to solve a problem. Suppose I have a calculation engine (that searches for a solution). I'd like to parallelize that search both across cpus and across nodes by giving each cpu on each node its o

    Tags: map, shared, scala, stm, akka

Copyright (C) dskims.com, All Rights Reserved.

processed in 4.812 (s). 9 q(s)