Thread pools on the JVM should usually be divided into the following three categories:
- CPU-bound
- Blocking IO
- Non-blocking IO polling
Each of these categories has a different optimal configuration and usage pattern.
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- Add this as a debug manifest so the permissions won't be required by your production app --> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <uses-permission android:name="android.permission.WAKE_LOCK" /> | |
| <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | |
| </manifest> |
| // Largely borrowed from Jake Wharton's Kotterknife (https://github.com/JakeWharton/kotterknife) | |
| // and paweljaneczek's PR for resetting cached views (https://github.com/JakeWharton/kotterknife/pull/37) | |
| package com.bluelinelabs.conductor.butterknife | |
| import android.view.View | |
| import com.bluelinelabs.conductor.Controller | |
| import java.util.Collections | |
| import java.util.WeakHashMap | |
| import kotlin.properties.ReadOnlyProperty |
| /* | |
| * The MIT License | |
| * | |
| * Copyright (c) 2016 Andreas Ahlenstorf | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="be.rijckaert.tim.disableanimations"> | |
| <!-- Place this permission in your debug folder --> | |
| <uses-permission android:name="android.permission.SET_ANIMATION_SCALE"/> | |
| </manifest> |
| import android.app.Service; | |
| import android.content.ComponentName; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.ServiceConnection; | |
| import android.os.Binder; | |
| import android.os.IBinder; | |
| import io.reactivex.Observable; |
| import arrow.* | |
| import arrow.core.* | |
| import arrow.typeclasses.* | |
| import arrow.data.* | |
| sealed class ValidationError(val msg: String) | |
| data class DoesNotContain(val value: String) : ValidationError("Did not contain $value") | |
| data class MaxLength(val value: Int) : ValidationError("Exceeded length of $value") | |
| data class NotAnEmail(val reasons: Nel<ValidationError>) : ValidationError("Not a valid email") |
| import arrow.Kind | |
| import arrow.core.Option | |
| import arrow.core.left | |
| import arrow.core.right | |
| import arrow.effects.typeclasses.Async | |
| import arrow.typeclasses.ApplicativeError | |
| data class UserId(val value: String) | |
| data class User(val userId: UserId) | |
| data class Task(val value: String) |
| import arrow.Kind | |
| import arrow.core.Option | |
| import arrow.core.Try | |
| import arrow.core.functor | |
| import arrow.effects.IO | |
| import arrow.effects.fix | |
| import arrow.effects.functor | |
| import arrow.typeclasses.Functor | |
| /* algebras */ |
| import com.google.protobuf.gradle.protobuf | |
| import com.google.protobuf.gradle.protoc | |
| plugins { | |
| java | |
| idea | |
| id("com.google.protobuf") version "0.8.7" | |
| } | |
| repositories { |